Files
git/builtin
Jeff King f8b090386b index-pack: loop while inflating objects in unpack_data
When the unpack_data function is given a consume() callback,
it unpacks only 64K of the input at a time, feeding it to
git_inflate along with a 64K output buffer.  However,
because we are inflating, there is a good chance that the
output buffer will fill before consuming all of the input.
In this case, we need to loop on git_inflate until we have
fed the whole input buffer, feeding each chunk of output to
the consume buffer.

The current code does not do this, and as a result, will
fail the loop condition and trigger a fatal "serious inflate
inconsistency" error in this case.

While we're rearranging the loop, let's get rid of the
extra last_out pointer. It is meant to point to the
beginning of the buffer that we feed to git_inflate, but in
practice this is always the beginning of our same 64K
buffer, because:

  1. At the beginning of the loop, we are feeding the
     buffer.

  2. At the end of the loop, if we are using a consume()
     function, we reset git_inflate's pointer to the
     beginning of the buffer.  If we are not using a
     consume() function, then we do not care about the value
     of last_out at all.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-07-10 16:45:00 -07:00
..
2012-05-17 15:22:30 -07:00
2012-05-11 11:34:17 -07:00
2012-01-06 12:44:07 -08:00
2012-05-08 04:57:42 -04:00
2012-03-28 15:19:17 -07:00
2012-04-18 16:17:42 -07:00
2012-03-01 20:59:31 -08:00
2012-05-03 15:13:31 -07:00
2012-04-15 22:50:39 -07:00
2011-12-28 11:32:36 -08:00
2011-12-22 11:27:26 -08:00
2012-05-02 13:51:24 -07:00
2012-05-20 18:48:10 -07:00
2012-04-30 14:58:01 -07:00
2012-04-27 09:26:39 -07:00