From: Junio C Hamano Date: Tue, 17 Sep 2019 22:37:43 GMT Subject: Re: [RFC PATCH] merge-recursive: symlink's descendants not in way Message-ID: In-Reply-To: <20190917223236.149613-1-jonathantanmy@google.com> Jonathan Tan writes: >> 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).