Re: [PATCH 0/4] Add git-pack-intersect
- From
Junio C Hamano <junkio@cox.net>
- Date
- Nov 10, 2005, 00:15 UTC
- Message-ID
- <7vy83x73ze.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <43728523.1040209@etek.chalmers.se>
Lukas Sandström <lukass@etek.chalmers.se> 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.