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

Re: [kernel.org users] Re: auto-packing on kernel.org? please?

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Oct 17, 2005, 22:56 UTC
Message-ID
<Pine.LNX.4.63.0510171830030.23242@iabervon.org>
In-Reply-To
<7v3bmzzz30.fsf@assigned-by-dhcp.cox.net>
On Mon, 17 Oct 2005, Junio C Hamano wrote:
Show 19 quoted lines
> Nick Hengeveld <nickh@reactrix.com> writes:
> 
> > Gotcha - I'm still thinking in terms of content distribution, where
> > you only need a specific version of a tree to be available locally
> > and explicitly don't want to transfer history.
> 
> In other words, you'd want to also support CVS-like "working
> tree has the specific version, and history is not kept here, but
> available on demand, possibly over the network" mode of
> operation.  I'd say why not.  We could aim to have "working tree
> has the specific version and partial history of recent versions,
> and the ancient history is available on demand, possibly over
> the network" mode of operation.
> 
> It is somewhat different from the primary focus of what we have
> been doing, but I think it is a natural extension.  The
> invariant is that once you have a ref pointing at a specific
> commit, everything reachable from it ought to be available to
> you.
Wouldn't "git fetch http://.../foo.git/ master^{tree}" do the right thing?

You get only the current tree, and write a ref to the tree instead of the commit, maintaining the invariant. Of course, fetch.c needs a bit of work so that it can fetch objects in the process of figuring out what the refspec that it's really trying to fetch, but that should be simple enough.

Of course, this really isolates you from the history, since you don't even remember what the commit was that you've got the tree from, but that may not be an issue in a pure content distribution setup. Also, a pack file of a single tree isn't going to be terribly efficient, because pack files mostly exploit the high similarity between different versions of the same file.

My other idea is to have a file of things that you expect to be missing, even though they are referenced, and where to expect to find them if necessary. Then you could download the latest commit, mark its parents (unless you have them) as known-missing, and write the ref.

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C HamanoNext: Linus Torvalds
Message 27 of 33 in “auto-packing on kernel.org? please?”
  1. Linus TorvaldsOct 13, 2005
  2. Carl BaldwinNov 21, 2005
  3. Linus TorvaldsNov 21, 2005
  4. Junio C HamanoNov 21, 2005
  5. Linus TorvaldsNov 21, 2005
  6. Junio C HamanoNov 21, 2005
  7. Chuck LeverNov 22, 2005
  8. Linus TorvaldsNov 22, 2005
  9. Catalin MarinasNov 22, 2005
  10. Linus TorvaldsNov 22, 2005
  11. Chuck LeverNov 22, 2005
  12. Catalin MarinasNov 23, 2005
  13. Carl BaldwinNov 22, 2005
  14. Linus TorvaldsNov 22, 2005
  15. Linus TorvaldsOct 13, 2005
  16. Dirk BehmeOct 16, 2005
  17. Daniel BarkalowOct 16, 2005
  18. Nick HengeveldOct 16, 2005
  19. Brian GerstOct 16, 2005
  20. Junio C HamanoOct 16, 2005
  21. Nick HengeveldOct 16, 2005
  22. Junio C HamanoOct 16, 2005
  23. Nick HengeveldOct 17, 2005
  24. Junio C HamanoOct 17, 2005
  25. Nick HengeveldOct 17, 2005
  26. Junio C HamanoOct 17, 2005
  27. Daniel BarkalowOct 17, 2005
  28. Linus TorvaldsOct 17, 2005
  29. Nick HengeveldOct 17, 2005
  30. Daniel BarkalowOct 17, 2005
  31. Johannes SchindelinOct 16, 2005
  32. Brian GerstOct 16, 2005
  33. Catalin MarinasNov 23, 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.