• S
    Teach receive-pack how to keep pack files based on object count. · fc04c412
    Shawn Pearce 提交于
    Since keeping a pushed pack or exploding it into loose objects
    should be a local repository decision this teaches receive-pack
    to decide if it should call unpack-objects or index-pack --stdin
    --fix-thin based on the setting of receive.unpackLimit and the
    number of objects contained in the received pack.
    
    If the number of objects (hdr_entries) in the received pack is
    below the value of receive.unpackLimit (which is 5000 by default)
    then we unpack-objects as we have in the past.
    
    If the hdr_entries >= receive.unpackLimit then we call index-pack and
    ask it to include our pid and hostname in the .keep file to make it
    easier to identify why a given pack has been kept in the repository.
    
    Currently this leaves every received pack as a kept pack.  We really
    don't want that as received packs will tend to be small.  Instead we
    want to delete the .keep file automatically after all refs have
    been updated.  That is being left as room for future improvement.
    Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
    Signed-off-by: NJunio C Hamano <junkio@cox.net>
    fc04c412
sha1_file.c 44.0 KB