Re: [RFC PATCH] merge-recursive: symlink's descendants not in way
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 17, 2019, 22:37 UTC
- Message-ID
- <xmqq8sqm7dmw.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190917223236.149613-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 6 quoted lines
>> 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.
Yeah, I recall having to add has_symlink_leading_path() long time ago in different codepaths (including "apply"). It is not surprising to see a similar glitch remaining in merge-recursive (it's a tricky issue, and it's a tricky code).