1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 08:47:56 +01:00

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>
This commit is contained in:
Nicolas Pitre 2006-02-21 20:39:25 -05:00 committed by Junio C Hamano
parent d9ad59e763
commit cac251d0bc

View file

@ -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;