index-pack: smarter memory usage during delta resolution
commit6a87ed972c9c7a4b4378b6e34670d3aa2ac7ccc8
authorNicolas Pitre <nico@cam.org>
Fri, 17 Oct 2008 19:57:58 +0000 (17 15:57 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 18 Oct 2008 13:17:36 +0000 (18 06:17 -0700)
treea4d2b710c2579e6b163a4d50aa5c454c602c49ed
parent9441b61dc5c3f1f984114ec8bd470dc20c55dfe0
index-pack: smarter memory usage during delta resolution

There is no need to keep the base object data around after its last delta
has been resolved.  This also means that long delta chains with only one
delta per base won't grow the cache size unnecessarily as the base will
be freed before recursing down.

To make it easy, find_delta_children() is modified so the first and last
indices are initialized in all cases.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
index-pack.c