diff options
author | Shawn Pearce <spearce@spearce.org> | 2006-11-01 17:06:21 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-11-03 00:24:07 -0800 |
commit | fc04c412d8d2412e97bb2a664a1746e333dfd9ae (patch) | |
tree | 9aa24c52b0571079e2c53910e1d8105c6e6ca005 /cache.h | |
parent | bed006fbddf919eed81cf62954e0332a395bf035 (diff) | |
download | git-fc04c412d8d2412e97bb2a664a1746e333dfd9ae.tar.gz |
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 'cache.h')
-rw-r--r-- | cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -376,6 +376,7 @@ extern struct packed_git *parse_pack_index_file(const unsigned char *sha1, char *idx_path); extern void prepare_packed_git(void); +extern void reprepare_packed_git(void); extern void install_packed_git(struct packed_git *pack); extern struct packed_git *find_sha1_pack(const unsigned char *sha1, |