]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/index-pack.c
Allow pack header preprocessing before unpack-objects/index-pack.
authorNicolas Pitre <nico@cam.org>
Wed, 1 Nov 2006 22:06:20 +0000 (17:06 -0500)
committerJunio C Hamano <junkio@cox.net>
Fri, 3 Nov 2006 08:24:07 +0000 (00:24 -0800)
commitbed006fbddf919eed81cf62954e0332a395bf035
tree600bfa85e7e1947d669c4cdba78072eb0d09dece
parent407e1d6e127357a0fbe1a9f91ee616a2b7ec29db
Allow pack header preprocessing before unpack-objects/index-pack.

Some applications which invoke unpack-objects or index-pack --stdin
may want to examine the pack header to determine the number of
objects contained in the pack and use that value to determine which
executable to invoke to handle the rest of the pack stream.

However if the caller consumes the pack header from the input stream
then its no longer available for unpack-objects or index-pack --stdin,
both of which need the version and object count to process the stream.

This change introduces --pack_header=ver,cnt as a command line option
that the caller can supply to indicate it has already consumed the
pack header and what version and object count were found in that
header.  As this option is only meant for low level applications
such as receive-pack we are not documenting it at this time.

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