git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH 2/2 - RFH/WIP] xdiff-merge: optionally show conflicts in "diff3 -m" style
Date: Thu, 28 Aug 2008 17:34:36 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0808281727490.3300@nehalem.linux-foundation.org> (raw)
In-Reply-To: <7vsksobrn9.fsf@gitster.siamese.dyndns.org>



On Thu, 28 Aug 2008, Junio C Hamano wrote:
> 
> Some poeple find it easier to be able to understand what is going on when
> they can view the common ancestor's version, which is used by "diff3 -m",
> which shows:
> 
>  <<<<<<<
>  postimage from one side;
>  |||||||
>  shared preimage;
>  =======
>  postimage of the other side; and
>  >>>>>>>
> 
> This is an initial step to bring that as an optional feature to git.
> Only "git merge-file" has been converted, with "--diff3" option.

If you have the common ancestor, why would you ever want this format, and 
not a nice conflict entry in the index?

Anyway, that's irrelevant for my real question, which is:

>  /*
> - * level == 0: mark all overlapping changes as conflict
> - * level == 1: mark overlapping changes as conflict only if not identical
> - * level == 2: analyze non-identical changes for minimal conflict set
> - * level == 3: analyze non-identical changes for minimal conflict set, but
> - *             treat hunks not containing any letter or number as conflicting
> + * "Level" parameter can be:
> + *
> + * (MINIMAL):
> + * Mark all overlapping changes as conflict
> + *
> + * (EAGER):
> + * Mark overlapping changes as conflict only if not identical
> + *
> + * (DIFF3):
> + * Same as EAGER but show the shared preimage in the output as well
> + *
> + * (ZEALOUS):
> + * Analyze non-identical changes for minimal conflict set
> + *
> + * (ZEALOUS_ALNUM):
> + * Analyze non-identical changes for minimal conflict set, but
> + * treat hunks not containing any letter or number as conflicting
>   *

Wouldn't it be much nicer to make this a bitflag, than an enumeration of 
different models?

In particular, why would it be wrong to want to be ZEALOUS (possibly 
_ALNUM) and still want DIFF3 output?

IOW, I don't think these are at all disjoint sets. In fact, I think DIFF3 
sounds not at all like a "level" to me, but like an output format thing, 
so it's in a totally different "address space".

Hmm?

		Linus

  reply	other threads:[~2008-08-29  0:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-29  0:09 [PATCH 1/2] xdl_fill_merge_buffer(): separate out a too deeply nested function Junio C Hamano
2008-08-29  0:18 ` [PATCH 2/2 - RFH/WIP] xdiff-merge: optionally show conflicts in "diff3 -m" style Junio C Hamano
2008-08-29  0:34   ` Linus Torvalds [this message]
2008-08-29  1:07     ` Junio C Hamano
2008-08-31  7:10       ` Junio C Hamano
2008-08-31 17:38         ` Linus Torvalds
2008-08-31 18:42           ` Junio C Hamano
2008-08-29  6:27     ` Junio C Hamano
2008-08-29  9:01     ` 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

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

  git send-email \
    --in-reply-to=alpine.LFD.1.10.0808281727490.3300@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).