aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-02-21 20:39:25 -0500
committerJunio C Hamano <junkio@cox.net>2006-02-22 00:36:09 -0800
commitcac251d0bc4c68b7ab36026990aff3c783913ae6 (patch)
tree1c93299282f1a286bfba15637f568279d7e58068
parentd9ad59e7636d98daa6131e9fd2cb2b4f5745a853 (diff)
downloadgit-cac251d0bc4c68b7ab36026990aff3c783913ae6.tar.gz
git-cac251d0bc4c68b7ab36026990aff3c783913ae6.tar.xz
relax delta selection filtering in pack-objects
This change provides a 8% saving on the pack size with a 4% CPU time increase for git-repack -a on the current git archive. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--pack-objects.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pack-objects.c b/pack-objects.c
index 0c9f4c9d2..e3946db5c 100644
--- a/pack-objects.c
+++ b/pack-objects.c
@@ -629,11 +629,10 @@ static int try_delta(struct unpacked *cur, struct unpacked *old, unsigned max_de
}
size = cur_entry->size;
- if (size < 50)
- return -1;
oldsize = old_entry->size;
sizediff = oldsize > size ? oldsize - size : size - oldsize;
- if (sizediff > size / 8)
+
+ if (size < 50)
return -1;
if (old_entry->depth >= max_depth)
return 0;