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

Re: symlinked directories in refs are now unreachable

From
MDMatt Draisey <mattdraisey@sympatico.ca>
Date
Aug 18, 2005, 21:56 UTC
Message-ID
<1124402196.1557.41.camel@della.draisey.ca>
In-Reply-To
<7vslx8thx9.fsf@assigned-by-dhcp.cox.net>

Thanks for committing my one-character patch. In the commit message you said

Show 5 quoted lines
> Come to think of
> it, maybe we should disallow symlink inside .git/refs hierarchy;
> we update the files there by creat/rename pair, so having
> symlinks would not work anyway when you do anything that would
> update them.]

I agree, linking at the file level makes no sense --- create/rename pairs will clobber symlinked files (as they would for hardlinked files). If you accept their use at all, symlinked directories are the only way to go.

The alternatives to symlinked directories are:

(1) adding a command line option to fsck that supplies a path to an external refs directory

(1a) adding a subtool to create a commandline list of sha from a supplied path to an external refs directory

(2) adding an environment variable to do the same

(3) adding a .git configuration file which contains a path --- this is just a userspace symlink

(4) create a monster (refcounting objects?) (true cross-references?) (conservative garbage collectors that scan your entire hard disk for potential references)

(I believe the same arguments hold for the pulling code as for fsck)

Case (1) is easy to implement. (I whipped up a working patch yesterday) The hardest part is thinking up a good name for the command line argument. Case (1a) is too ugly. Both of these cases place a considerable burden on the user, and require some Porcelain work. Case (2) makes sense but is too intrusive for me to contemplate. I defer to a core developer. Case (3) offers no advantages over a symlinked directory under refs. Case (4) is probably patented by Microsoft.

I like symlinks for their simplicity, and that they work now. Otherwise I am a really only submitting a feature request.

Matt
Previous: Junio C Hamano
Message 9 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.