Skip to content

Commit

Permalink
consider previous pack undeltified object state only when reusing del…
Browse files Browse the repository at this point in the history
…ta data

Without this there would never be a chance to improve packing for
previously undeltified objects.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Jun 30, 2006
1 parent 9332607 commit 8dbbd14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,10 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,

/*
* We do not bother to try a delta that we discarded
* on an earlier try.
* on an earlier try, but only when reusing delta data.
*/
if (trg_entry->in_pack && trg_entry->in_pack == src_entry->in_pack)
if (!no_reuse_delta && trg_entry->in_pack &&
trg_entry->in_pack == src_entry->in_pack)
return 0;

/*
Expand Down

0 comments on commit 8dbbd14

Please sign in to comment.