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

[RFC] Design for http-pull on repo with packs

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jul 10, 2005, 18:42 UTC
Message-ID
<Pine.LNX.4.21.0507101226011.30848-100000@iabervon.org>

I have a design for using http-pull on a packed repository, and it only requires one extra file in the repository: an append-only list of the pack files (because getting the directory listing is very painful and failure-prone).

The first thing to note is that fetch() is allowed to get more than just the requested object. This means that we can get the pack file with the requested object, and this will fulfill the contract of fetch(), and, hopefully, be extra-helpful (since we expect the repository owner to have packed stuff together usefully). So I do this:

 Try to get individual files. So long as this works, everything is as
  before.
 If an individual file is not available, figure out what packs are
  available:
   Get the list of pack files the repository has
    (currently, I just use "e3117bbaf6a59cb53c3f6f0d9b17b9433f0e4135")
   For any packs we don't have, get the index files.
   Keep a list of the struct packed_gits for the packs the server has
    (these are not used as places to look for objects)
 Each time we need an object, check the list for it. If it is in there,
  download the corresponding pack and report success.

I've nearly got an implementation ready, except for not having a way of getting a list of available packs. It seems to work for getting e3117bbaf6a59cb53c3f6f0d9b17b9433f0e4135 when necessary, although I'm still debugging the last few things.

	-Daniel
*This .sig left intentionally blank*
Next: Dan Holmsand
Message 1 of 9 in “[RFC] Design for http-pull on repo with packs”
  1. Daniel BarkalowJul 10, 2005
  2. Dan HolmsandJul 10, 2005
  3. Daniel BarkalowJul 10, 2005
  4. Dan HolmsandJul 10, 2005
  5. Junio C HamanoJul 11, 2005
  6. Dan HolmsandJul 11, 2005
  7. Tony LuckJul 11, 2005
  8. Junio C HamanoJul 11, 2005
  9. Dan HolmsandJul 12, 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.