From: Jonathan Tan <jonathantanmy@google.com>
To: gitster@pobox.com
Cc: jonathantanmy@google.com, git@vger.kernel.org, newren@gmail.com
Subject: Re: [RFC PATCH] merge-recursive: symlink's descendants not in way
Date: Tue, 17 Sep 2019 15:32:36 -0700 [thread overview]
Message-ID: <20190917223236.149613-1-jonathantanmy@google.com> (raw)
In-Reply-To: <xmqqh85a7eax.fsf@gitster-ct.c.googlers.com>
> Jonathan Tan <jonathantanmy@google.com> writes:
>
> > When the working tree has:
> > - foo (symlink)
> > - foo/bar (directory)
>
> Whoa, wait. I assume, since this is about merge, the assumption is
> that the working tree is clean with respect to the index, so 'foo'
> is a symbolic link that is in the index. Now, if foo is a symlink,
> how can foo/bar (whether it is a directory or something else) exist,
> which requires foo to be a directory in the first place?
I was trying to be concise but I guess I omitted too much detail. This is
what's happening:
Working tree:
- foo (symlink pointing to .)
- bar (directory)
- bar/file (file)
And the new commit:
- foo (directory)
- foo/bar (file)
- bar (directory)
- bar/file (file)
I'll update the commit message when I send out another version.
> In any case, if the working tree has 'foo' as a symlink, Git should
> not look at or get affected by what 'foo' points at.
Git should not, but it does - there is a call in process_entry() that calls
lstat() on "foo/bar", which indeed reports that "foo/bar" is a directory. This
patch adds a check that none of its ancestors are symlinks.
next prev parent reply other threads:[~2019-09-17 22:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-16 21:47 merge-recursive thinks symlink's child dirs are "real" Jonathan Tan
2019-09-16 22:15 ` SZEDER Gábor
2019-09-17 15:54 ` Elijah Newren
2019-09-17 0:09 ` Jonathan Nieder
2019-09-17 16:02 ` Elijah Newren
2019-09-17 15:48 ` Elijah Newren
2019-09-17 21:50 ` [RFC PATCH] merge-recursive: symlink's descendants not in way Jonathan Tan
2019-09-17 22:23 ` Junio C Hamano
2019-09-17 22:32 ` Jonathan Tan [this message]
2019-09-17 22:37 ` Junio C Hamano
2019-09-17 22:49 ` Jonathan Tan
2019-09-17 23:02 ` SZEDER Gábor
2019-09-18 0:35 ` Elijah Newren
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=20190917223236.149613-1-jonathantanmy@google.com \
--to=jonathantanmy@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
/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).