symlinked working tree gotcha

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

joey@gnu:/tmp>mkdir foo
joey@gnu:/tmp>cd foo
joey@gnu:/tmp/foo>git init
Initialized empty Git repository in /tmp/foo/.git/
joey@gnu:/tmp/foo>touch foo
joey@gnu:/tmp/foo>git add /tmp/foo/foo
joey@gnu:/tmp/foo>cd ..
joey@gnu:/tmp>ln -s foo bar
joey@gnu:/tmp>cd bar
joey@gnu:/tmp/bar>touch bar
joey@gnu:/tmp/bar>git add /tmp/bar/bar
fatal: '/tmp/bar/bar' is outside repository

Is this a bug or a feature of git? I had some code where I had, lazily,
assumed that passing the full path to the file would always work, since
it did, in my experience.

-- 
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