git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Antoine Pelisse" <apelisse@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	git <git@vger.kernel.org>,
	kernel@pengutronix.de
Subject: Re: feature suggestion: optimize common parts for checkout --conflict=diff3
Date: Thu, 07 Mar 2013 10:40:46 -0800	[thread overview]
Message-ID: <7vfw07m4sx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20130307180157.GA6604@sigill.intra.peff.net> (Jeff King's message of "Thu, 7 Mar 2013 13:01:57 -0500")

Jeff King <peff@peff.net> writes:

> I'm not sure I agree. In this output (which does the zealous
> simplification, the splitting, and arbitrarily assigns deleted preimage
> to the first of the split hunks):
>
>   1234A<B|56=X>C<D|Y>E789
>
> I do not see the promotion of C to "already resolved, you cannot tell if
> it was really in the preimage or not" as any more or less misleading or
> wrong than that of A or E.  It is no more misleading than what the
> merge-marker case would do, which would be:
>
>   1234A<B=X>C<D=Y>E789

That is exactly my point and I think we are in complete agreement.
While the intended difference between RCS merge and diff3 -m is for
the latter not to lose information on the original, zealous-diff3
chooses to lose information in "both sides added, identically" case.

Where we differ is if such information loss is a good thing to have.

We could say "both sides added, identically" is auto-resolved when
you use the zealous option, and do so regardless of how the merge
conflicts are presented.  Then it becomes perfectly fine to eject
"A" and "E" out of the conflicted block and merge them to be part of
pre/post contexts.  The same goes for reducing "<C|=C>" to "C".  As
long as we clearly present the users what the option does and what
its implications are, it is not bad to have such an option, I think.

> The wrong thing to me is the arbitrary choice about how to distribute
> the preimage lines.

Yeah, but that is not "diff3 -m" vs "zealous-diff3" issue, is it?
If you value the original and want to show it somewhere, you cannot
avoid making the choice whether you are zealous or not if you split
such a hunk.

  reply	other threads:[~2013-03-07 18:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 15:05 feature suggestion: optimize common parts for checkout --conflict=diff3 Uwe Kleine-König
2013-03-06 18:27 ` Antoine Pelisse
2013-03-06 19:26 ` Antoine Pelisse
2013-03-06 20:03   ` Jeff King
2013-03-06 20:36     ` [PATCH] xdiff: implement a zealous diff3 Uwe Kleine-König
2013-03-06 20:46       ` Jeff King
2013-03-06 20:40     ` feature suggestion: optimize common parts for checkout --conflict=diff3 Junio C Hamano
2013-03-06 20:54       ` Jeff King
2013-03-06 21:09         ` Junio C Hamano
2013-03-06 21:21           ` Jeff King
2013-03-06 21:50             ` Junio C Hamano
2013-03-07  1:02               ` Jeff King
2013-03-06 21:31           ` Uwe Kleine-König
2013-03-06 21:32           ` Junio C Hamano
2013-03-07  8:04             ` Jeff King
2013-03-07 17:26               ` Junio C Hamano
2013-03-07 18:01                 ` Jeff King
2013-03-07 18:40                   ` Junio C Hamano [this message]
2013-03-07 18:50                     ` Jeff King
2013-04-04 20:33                       ` Jeff King
2013-04-04 20:49                         ` Uwe Kleine-König
2013-04-04 20:54                           ` Jeff King
2013-04-04 21:19                             ` Junio C Hamano
2013-03-07 18:21                 ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vfw07m4sx.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=apelisse@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=peff@peff.net \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).