Browse Source

consider previous pack undeltified object state only when reusing delta 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>
maint
Nicolas Pitre 19 years ago committed by Junio C Hamano
parent
commit
8dbbd14ea3
  1. 5
      pack-objects.c

5
pack-objects.c

@ -989,9 +989,10 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, @@ -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;

/*

Loading…
Cancel
Save