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

Re: symlinked directories in refs are now unreachable

From
Junio C Hamano <junkio@cox.net>
Date
Aug 17, 2005, 20:41 UTC
Message-ID
<7vslx8thx9.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<1124246082.776.54.camel@della.draisey.ca>
Matt Draisey <mattdraisey@sympatico.ca> writes:
Show 10 quoted lines
> Having thus been forced to read the mailing list, I see a slight problem
> in .git/objects/info/alternates mechanism.  Using the original
> ALTERNATE_DB_ENVIRONMENT variable you assert to the git programmes that
> you know all the repositories to search for objects.  In
> the .git/objects/info/alternates mechanism you implicitly defer to other
> repositories, which might also implicitly defer to yet another
> repository.  To ensure an object is truly available you need to compute
> a transitive closure on all .git/objects/info/alternates --- you can't
> really rely on .git/objects/info/alternates being transitively closed
> already.

No, "git clone -l -s" not copying the objects/info/alternates of the repository being cloned was simply a bug; by doing so the transitive closure can be set up "initially".

Both the environment variable and objects/info/alternates share the same problem if the cloned/borrowed from repository suddenly starts to borrow from another repository, losing objects it used to have from itself. You just shouldn't do it.

With objects/info/alternates, you _could_ do the transitive closure at runtime and do not have to worry about this issue (but you now need to worry about cycles), which you cannot do with the environment variable approach.

Previous: Matt DraiseyNext: Matt Draisey
Message 8 of 9 in “symlinked directories in refs are now unreachable”
  1. Matt DraiseyAug 15, 2005
  2. Linus TorvaldsAug 15, 2005
  3. Junio C HamanoAug 15, 2005
  4. Matt DraiseyAug 15, 2005
  5. Matt DraiseyAug 17, 2005
  6. Junio C HamanoAug 16, 2005
  7. Matt DraiseyAug 15, 2005
  8. Junio C HamanoAug 17, 2005
  9. Matt DraiseyAug 18, 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.