Skip to content
  • Nicolas Pitre's avatar
    Allow pack header preprocessing before unpack-objects/index-pack. · bed006fb
    Nicolas Pitre authored
    
    
    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: default avatarNicolas Pitre <nico@cam.org>
    Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
    bed006fb