Re: [PATCH 0/4] Add git-pack-intersect
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:11
Lukas Sandström [off-list ref] writes:
Perhaps if git-daemon ever does caching of packfiles, removing the smaller packfiles might not be optimal.
Ah, that reminds me of something. I did not advertise it too much, but you can put a prepackaged packs in $GIT_DIR/pack-cache/ and it is used when upload-pack notices it is creating that exact pack. This is useless for ordinary repository, but can be useful for historical repositories whose heads/tags never change (e.g. the Linux kernel repository resurrected from bkcvs). There you could: $ git repack -a -d $ ln $GIT_DIR/objects/pack/pack-* $GIT_DIR/pack-cache/. and a clone request would feed the pack, without regenerating the pack data from scratch. upload-pack still reads, sorts and computes SHA1 hash of the list of objects to find the pack name, but that is a fairly quick operation, compared to the rest of the pack generation process.