Re: Having Git follow symlinks
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 31, 2014, 17:23 UTC
- Message-ID
- <xmqq38k4hxq4.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <alpine.DEB.2.00.1401311052370.3993@ds9.cixit.se>
Peter Krefting <peter@softwolves.pp.se> writes:
> ...if I have the time, maybe I can come up with a patch. There is > already some hacks in the "core.symlinks" setting, so I guess it > should be possible.
That is totally unrelated. The variable only says "on this platform and/or filesystem, you cannot symlink(2), so instead create a regular file with the symlink contents when checking out a symlink blob". Most importantly, the variable does not change the fact that symbolic links are explicitly tracked without dereferencing.
If you have, under a directory foo/, a symbolic link foo/bar that points at "../baz", a directory foo/baz/, and you have a file at foo/baz/hello:
1. "git add foo" and "git add foo/bar" will add foo/bar as a
symlink; and
2. "git add foo/bar/hello" is an error.The variable does not have any interactions with the logic to make sure 2. errors out correctly, so the presense of it does not imply anything.