Re: Git doesn't support symlinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for your feedback!

> On Mar 25, 2020, at 8:23 PM, Bryan Turner <bturner@xxxxxxxxxxxxx> wrote:
> 
> This didn't add the same thing. What does a "git status" show at this
> point? I'd expect it would show "Versions/Current/Headers/interior.h"
> as added to the index, not "Headers/interior.h".

$ git add .
$ git status
Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
	new file:   Foo.framework/Headers
	new file:   Foo.framework/Versions/A/Headers/Interior.h

> It doesn't necessarily seem like a bug, to me; more like a case where
> Git could potentially be "smarter" to try and determine that, while
> "Headers/interior.h" is beyond a symlink, the target of that symlink
> is still in the repository. (Versions/Current _is_ in the same
> repository, right?)

Agree, makes sense!

I think what happens here is that `git add .` adds the Foo.framework/Headers directory first, to circumvent this check failing here?
https://github.com/git/git/blob/master/pathspec.c#L596
Whereas a single “git add path/to/file” would fail here



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux