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

Re: symlinked working tree gotcha

From
Joey Hess <joey@kitenet.net>
Date
Apr 25, 2011, 19:09 UTC
Message-ID
<20110425190938.GA24744@gnu.kitenet.net>
In-Reply-To
<7vpqoajiz0.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 12 quoted lines
> Two 'foo's makes it confusing to read so let's rephrase.
> 
> Given this structure:
> 
>     /tmp/foo/
>     /tmp/foo/.git/
>     /tmp/foo/hello
>     /tmp/sym@ -> foo
> 
> when you refer to /tmp/sym/hello where $(/bin/pwd) is /tmp/foo, should it
> be considered to be within the bounds of the working tree that is governed
> by your current $GIT_DIR (which is ".git")?
Hmm, my /bin/pwd does not return "/tmp/foo" when I've cd'd to "/tmp/sym".
> The answer is "perhaps yes, ideally speaking, but does it really matter in
> practice, or is it just nice to have?".

FWIW, my motivation for using the absolute path was that I wanted to always add $GIT_WORK_TREE/hello, but the add could be run when in a subdirectory of the repository, so "git add hello" might not add the right file.

-- 
see shy jo
Previous: Junio C HamanoNext: Jay Soffian
Message 3 of 4 in “symlinked working tree gotcha”
  1. Joey HessApr 24, 2011
  2. Junio C HamanoApr 25, 2011
  3. Joey HessApr 25, 2011
  4. Jay SoffianApr 26, 2011

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.