git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] Support for packs in HTTP

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 10, 2005, 23:45 UTC
Message-ID
<Pine.LNX.4.58.0507101637390.17536@g5.osdl.org>
In-Reply-To
<7vzmsus1eu.fsf@assigned-by-dhcp.cox.net>
On Sun, 10 Jul 2005, Junio C Hamano wrote:
Show 5 quoted lines
>
> 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.

>     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 anything.

		Linus
Previous: Junio C HamanoNext: Daniel Barkalow
Message 8 of 15 in “Support for packs in HTTP”
  1. 0/2 Support for packs in HTTPDaniel Barkalow, Jul 10, 2005
  2. 1/2 Management of packs not yet installedDaniel Barkalow, Jul 10, 2005
  3. 2/2 Demo support for packs via HTTPDaniel Barkalow, Jul 10, 2005
  4. Darrin ThompsonJul 11, 2005
  5. Daniel BarkalowJul 12, 2005
  6. Darrin ThompsonJul 12, 2005
  7. Junio C HamanoJul 10, 2005
  8. Linus TorvaldsJul 10, 2005
  9. Daniel BarkalowJul 11, 2005
  10. Linus TorvaldsJul 11, 2005
  11. Daniel BarkalowJul 11, 2005
  12. Linus TorvaldsJul 11, 2005
  13. Daniel BarkalowJul 11, 2005
  14. Linus TorvaldsJul 11, 2005
  15. Daniel BarkalowJul 11, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.