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

Re: Pushing vs. alternates

From
Junio C Hamano <junkio@cox.net>
Date
Oct 24, 2006, 17:33 UTC
Message-ID
<7vmz7lhb4h.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vzmblhc3y.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 9 quoted lines
>> Well, I would send haves for the alternate repository anyway,...
>
> While I agree it would be an optimization if it worked, there is
> one conceptual problem here though, coming from old warts.  It's
> not alternate "repository" but it is alternate object store.
> There is no guarantee that refs/ directory that is next to the
> objects/ alternate points at is related to that object store,
> for historical reasons (i.e. we have separate GIT_DIR and
> GIT_OBJECT_DIRECTORIES).

Having said that, I am not opposed to the idea of using refs/ next to objects/ your alternate points at. Certainly I would not have any objection (heck I would even volunteer to code it myself if only to see how much we can save) if we did not have GIT_OBJECT_DIRECTORY in the system (i.e. if we had a guarantee from the beginning that objects/ directory that is next to refs/ *must* be related). So I am Ok with this change, but I would feel better if we add a few sentences to repository-layout.txt that warns about the (technically new although it is very likely that violating it would not have been useful at all) restriction.

I suspect we could do the same for fetching in principle, e.g. when you track Linus's and a subsystem maintainer's trees and these two repositories are linked with alternates at your end. Fetching into your copy of Linus's and then fetching into your copy of subsystem would be optimized the same way if you send refs/ from the alternates as HAVEs, right?

Previous: Petr Baudis
Message 7 of 7 in “Pushing vs. alternates”
  1. Petr BaudisOct 24, 2006
  2. Junio C HamanoOct 24, 2006
  3. Shawn PearceOct 24, 2006
  4. Petr BaudisOct 24, 2006
  5. Junio C HamanoOct 24, 2006
  6. Petr BaudisOct 24, 2006
  7. Junio C HamanoOct 24, 2006

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.