summaryrefslogtreecommitdiff
path: root/pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-06-30 03:44:52 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-06-30 06:48:29 (GMT)
commit8dbbd14ea3ae1b4e825f1e7d314afddf26c67298 (patch)
treea943168ab775ea678a9327b0bc8f6bce70c67562 /pack-objects.c
parent93326071ea84a7685783ae76d9a8cec0a11845d0 (diff)
downloadgit-8dbbd14ea3ae1b4e825f1e7d314afddf26c67298.zip
git-8dbbd14ea3ae1b4e825f1e7d314afddf26c67298.tar.gz
git-8dbbd14ea3ae1b4e825f1e7d314afddf26c67298.tar.bz2
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>
Diffstat (limited to 'pack-objects.c')
-rw-r--r--pack-objects.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pack-objects.c b/pack-objects.c
index 6e17676..47da33b 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;
/*