From: Nicolas Pitre Date: Wed, 22 Feb 2006 01:39:25 +0000 (-0500) Subject: relax delta selection filtering in pack-objects X-Git-Tag: v1.3.0-rc1~108^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cac251d0bc4c68b7ab36026990aff3c783913ae6;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/pack-objects.c b/pack-objects.c index 0c9f4c9d..e3946db5 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;