From: Junio C Hamano Date: Fri, 16 Aug 2019 16:51:37 GMT Subject: Re: BUG?: xdl_merge surprisingly does not recognize content conflict Message-ID: In-Reply-To: <20190815220303.17209-1-newren@gmail.com> Elijah Newren writes: > Now, a manual merge of these files gives no conflicts, which surprises me: > > $ git merge-file ours base theirs; echo $? > 0 Indeed that is surprising. > -- 8< -- > Subject: checkout: remove duplicate code > > Both commit a7256debd4b6 ("checkout.txt: note about losing staged > changes with --merge", 2019-03-19) from nd/checkout-m-doc-update and > commit 6eff409e8a76 ("checkout: prevent losing staged changes with > --merge", 2019-03-22) from nd/checkout-m were included in git.git > despite the fact that the latter was meant to be v2 of the former. > The merge of these two topics resulted in a redundant chunk of code; > remove it. > > Signed-off-by: Elijah Newren The latter half that you remove cannot be reached, because the first half would have already died after checking the same condition, so we were doing the same repo-index-has-changes check twice when there is no change; in other words, we were lucky that this accidental dup did not cause any real damange. Thanks for spotting. Will apply.