Re: [PATCH 0/2] Support for packs in HTTP
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Jul 11, 2005, 00:20 UTC
- Message-ID
- <Pine.LNX.4.21.0507101959410.30848-100000@iabervon.org>
- In-Reply-To
- <Pine.LNX.4.58.0507101637390.17536@g5.osdl.org>
On Sun, 10 Jul 2005, Linus Torvalds wrote:
Show 23 quoted lines
> 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
> .git/objects/pack.
>
> 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.Shouldn't we do the same thing we do with object files? I don't see any difference in desired behavior.
Show 7 quoted lines
> > 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.Why not checksum it in a predictable order, either that of the pack file or the index? We do care that it's something verifiable, so that people can't cause intentional collisions (for a DoS) just by naming their packs after existing packs that users might not have downloaded yet.
-Daniel *This .sig left intentionally blank*