Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-11-15 09:18:31 +0300
committerJunio C Hamano <junkio@cox.net>2006-11-17 11:09:52 +0300
commite9195b584f6ad49b637b56be0705a7362a95d692 (patch)
tree6be750df4dc97140b9d95691ad2b29cb69d04ef2 /builtin-pack-objects.c
parent6b1f8c32b1a602734f14b9cf8a9f59a767752677 (diff)
pack-objects: tweak "do not even attempt delta" heuristics
The heuristics to give up deltification when both the source and the target are both in the same pack affects negatively when we are repacking the subset of objects in the existing pack. This caused any incremental updates to use suboptimal packs. Tweak the heuristics to avoid this problem. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 69e5dd39ca..753bcd57b0 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1176,7 +1176,9 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
* on an earlier try, but only when reusing delta data.
*/
if (!no_reuse_delta && trg_entry->in_pack &&
- trg_entry->in_pack == src_entry->in_pack)
+ trg_entry->in_pack == src_entry->in_pack &&
+ trg_entry->in_pack_type != OBJ_REF_DELTA &&
+ trg_entry->in_pack_type != OBJ_OFS_DELTA)
return 0;
/*