Re: BUG?: xdl_merge surprisingly does not recognize content conflict
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 16, 2019, 16:51 UTC
- Message-ID
- <xmqqh86h12au.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190815220303.17209-1-newren@gmail.com>
Elijah Newren <newren@gmail.com> 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.
Show 12 quoted lines
> -- 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 <newren@gmail.com>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.