pack-objects: equal objects in size should delta against newer objects
commitadcc70950e594065050c375ace8a039678d2e31f
authorNicolas Pitre <nico@cam.org>
Mon, 16 Apr 2007 16:28:52 +0000 (16 12:28 -0400)
committerJunio C Hamano <junkio@cox.net>
Tue, 17 Apr 2007 00:43:30 +0000 (16 17:43 -0700)
treea49e9c1f98a0adbece2b07136ebe76d7c2f9336b
parent8a5a8d6c97e36dbd95361eab1109e4380fe45df4
pack-objects: equal objects in size should delta against newer objects

Before finding best delta combinations, we sort objects by name hash,
then by size, then by their position in memory.  Then we walk the list
backwards to test delta candidates.

We hope that a bigger size usually means a newer objects.  But a bigger
address in memory does not mean a newer object.  So the last comparison
must be reversed.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pack-objects.c