summaryrefslogtreecommitdiff
path: root/hash-object.c
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2006-11-01 22:06:21 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-11-03 08:24:07 (GMT)
commitfc04c412d8d2412e97bb2a664a1746e333dfd9ae (patch)
tree9aa24c52b0571079e2c53910e1d8105c6e6ca005 /hash-object.c
parentbed006fbddf919eed81cf62954e0332a395bf035 (diff)
downloadgit-fc04c412d8d2412e97bb2a664a1746e333dfd9ae.zip
git-fc04c412d8d2412e97bb2a664a1746e333dfd9ae.tar.gz
git-fc04c412d8d2412e97bb2a664a1746e333dfd9ae.tar.bz2
Teach receive-pack how to keep pack files based on object count.
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: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'hash-object.c')
0 files changed, 0 insertions, 0 deletions