From: Daniel Malendez <dmalendez@googlemail.com>
To: Bryan Turner <bturner@atlassian.com>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: Git doesn't support symlinks
Date: Wed, 25 Mar 2020 20:37:30 -0400 [thread overview]
Message-ID: <F9453040-2E7D-4CAB-AA7F-0C6C04E2FC99@googlemail.com> (raw)
In-Reply-To: <D3B355BB-BB09-4AA7-8D8A-58B61529D617@googlemail.com>
Thanks for your feedback!
> On Mar 25, 2020, at 8:23 PM, Bryan Turner <bturner@atlassian.com> 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
next prev parent reply other threads:[~2020-03-26 0:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 23:38 Git doesn't support symlinks Daniel Malendez
2020-03-26 0:23 ` Bryan Turner
[not found] ` <D3B355BB-BB09-4AA7-8D8A-58B61529D617@googlemail.com>
2020-03-26 0:37 ` Daniel Malendez [this message]
2020-03-26 0:50 ` Danh Doan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F9453040-2E7D-4CAB-AA7F-0C6C04E2FC99@googlemail.com \
--to=dmalendez@googlemail.com \
--cc=bturner@atlassian.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).