On Sun, 10 Jul 2005, Junio C Hamano wrote:
> 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);

Well, regardless, we want to be able to specify which directory to write 
them to. We don't necessarily want to write them to the current working 
directory, nor do we want to write them to their eventual destination in 

In fact, the main current user ("git repack") really wants to write them 
to a temporary file, and one that isn't even called "pack-xxx", since it 
ends up doing cleanup with 

        rm -f .tmp-pack-*

in case a previous re-pack was interrupted (in which case it simply cannor
know what the exact name was supposed to be).

So the "basename" ends up being necessary and meaningful regardless. We do 
_not_ want to remove that capability.

>     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;

Now, that would be fine, but it can't be done. Not the way things are laid 
out. A SHA1 checksum depends on the order the data was checksummed in, and 
we don't even save that.

>   - or drop sha1_pack_name() and let the user name the pack any
>     way he wants.

No, I do want to use a SHA1, because I want to make sure that you can mix 
packs in a rsync/wget environment where if two files are named the same, 
they'll have the same contents.

So we can make verify-pack check that the pack-name matches the style
"pack-xxxxx." naming convention, but we can't match up the sha1 with

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to