From: Thomas Rast Date: Wed, 27 Mar 2013 20:03:42 +0000 (+0100) Subject: sha1_file: remove recursion in unpack_entry X-Git-Tag: v1.8.3-rc0~62^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/abe601bba52ee6b0bf89d282aa1c3ef5fd89cbb0?ds=inline;hp=abe601bba52ee6b0bf89d282aa1c3ef5fd89cbb0 sha1_file: remove recursion in unpack_entry Similar to the recursion in packed_object_info(), this leads to problems on stack-space-constrained systems in the presence of long delta chains. We proceed in three phases: 1. Dig through the delta chain, saving each delta object's offsets and size on an ad-hoc stack. 2. Unpack the base object at the bottom. 3. Unpack and apply the deltas from the stack. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano ---