Re: [PATCH 0/2] Support for packs in HTTP
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jul 10, 2005, 23:10 UTC
- Message-ID
- <7vzmsus1eu.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.21.0507101539220.30848-100000@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
> This series has one patch which is ready to go in and one that's not > (although it's a reasonable phony for the current state of the git world).
I like the general direction in which this patch is leading us.
But before going further, I'd like to see a consensus on the pack naming convention. The "sha1 of packed object names" was originally introduced to easily avoid the pack name collisions, but not enforced, so a user could do the following and still expect things to work:
$ n=`git-pack-objects pk <list-of-objects`
$ mv pk-$n.pack .git/objects/pack/pk.pack
$ mv pk-$n.idx .git/objects/pack/pk.idxThe first part of this patch makes things stricter, and your packfile under .git/objects/pack _must_ be named pack-X{40}.pack (I am not saying this is a bad thing). So I would suggest either:
- droping the packname parameter from git-pack-objects. Make
the packs always named pack-X{40}.pack (or just X{40}.pack);
also have verify-pack to verify the name of the packfile,
and make sure X{40} part of the name matches what it claims
to contain; - or drop sha1_pack_name() and let the user name the pack any
way he wants.I am moderately in favor of the former.