Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: symlinked working tree gotcha

From: Joey Hess <hidden>
Date: 2016-06-15 22:51:05

Junio C Hamano wrote:
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help