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

Re: symlinked directories in refs are now unreachable

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 15, 2005, 03:12 UTC
Message-ID
<Pine.LNX.4.58.0508142007440.3553@g5.osdl.org>
In-Reply-To
<1124073677.27393.15.camel@della.draisey.ca>
On Mon, 15 Aug 2005, Matt Draisey wrote:
>
> The behaviour of the symlinked in ref directories has changed from
> earlier versions of git.

Hmm.. There used to be a mix of lstat() (in receive-pack) and stat() (in fsck-cache.c, and it got standardized in one function which used lstat.

The reason for the lstat is really to try to avoid having especially the remote protocols follow symlinks, but I guess it's not a very good reason, so I don't think it would be wrong to just standardize refs.c to use "stat()" instead.

You might sent a patch to Junio..
HOWEVER: symlinks for references really are pretty dangerous. We do things 
like "echo new-id > .git/HEAD" and links (symlinks _or_ hardlinks) thus 
really aren't safe. You're much better off copying those small files.
		Linus
Previous: Matt DraiseyNext: Junio C Hamano
Message 2 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.