]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/index-pack.c
index-pack: Chain the struct base_data on the stack for traversal
authorShawn O. Pearce <spearce@spearce.org>
Mon, 14 Jul 2008 02:07:45 +0000 (22:07 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 15 Jul 2008 13:30:59 +0000 (06:30 -0700)
commit4a438cabacdbfa71f59dad127d436bbb49a86f35
tree087c0721ad1a337a1af497e598adc3b22249cab4
parentf41aebd46998c8b6df3733196d55aeb7162b3df6
index-pack: Chain the struct base_data on the stack for traversal

We need to release earlier inflated base objects when memory gets
low, which means we need to be able to walk up or down the stack
to locate the objects we want to release, and free their data.

The new link/unlink routines allow inserting and removing the struct
base_data during recursion inside resolve_delta, and the global
base_cache gives us the head of the chain (bottom of the stack)
so we can traverse it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
index-pack.c