From: Nicolas Pitre Date: Fri, 30 Jun 2006 03:44:52 +0000 (-0400) Subject: consider previous pack undeltified object state only when reusing delta data X-Git-Tag: v1.4.1~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8dbbd14ea3ae1b4e825f1e7d314afddf26c67298;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/pack-objects.c b/pack-objects.c index 6e1767652..47da33baa 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -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; /*