git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: BUG?: xdl_merge surprisingly does not recognize content conflict
Date: Fri, 16 Aug 2019 09:51:37 -0700	[thread overview]
Message-ID: <xmqqh86h12au.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190815220303.17209-1-newren@gmail.com> (Elijah Newren's message of "Thu, 15 Aug 2019 15:03:03 -0700")

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.

> -- 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.

  parent reply	other threads:[~2019-08-16 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 22:03 BUG?: xdl_merge surprisingly does not recognize content conflict Elijah Newren
2019-08-15 22:06 ` Elijah Newren
2019-08-16 16:51 ` Junio C Hamano [this message]
2019-08-16 19:26   ` Elijah Newren
2019-08-16 18:40 ` Jeff King

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=xmqqh86h12au.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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).