git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@uchicago.edu>
Cc: git@vger.kernel.org, David Greaves <david@dgreaves.com>
Subject: Re: [PATCH] bring description of git diff --cc up to date
Date: Tue, 22 Jul 2008 14:21:02 -0700	[thread overview]
Message-ID: <7vd4l5lio1.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7v63qxn8w2.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Tue, 22 Jul 2008 10:09:17 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Jonathan Nieder <jrnieder@uchicago.edu> writes:
>
>> Just to make sure I understand, here is what I think --cc does:
>>
>>   - In a two-parent merge, it is exactly as Linus has been
>>     ...
>>   - In a many-parent merge, the criterion is more stringent.
>>     ...
>>
>> Is that correct?
>
> The logic in the code does not have separate criteria for two-parent and
> Octopus cases.  Actually Linus talks about "when you have two versions to
> choose from, and if the result matches one of them, then it is not
> interesting".  In a two-parent merge, you cannot have three or more
> possible versions to choose from by definition, can you?

To put it another way, I think what you wrote is correct, but two-parent
case is just a degenerated case of a more general rule, that is:

    A hunk is not interesting if the person who merged had only two
    choices offered by the parents to pick from, and the merge result
    exactly matched one of the choices.

You can come up with examples that do not match the above criteria; they
are all interesting.

For example, if all the parent of a tripus disagreed, the person had more
than two choices to pick from, so no matter what the resolution is, the
hunk is interesting.

On the other hand, if 4 parents in a dodecapus lack a line that all other
8 parents have (see the first example in [*1*]), then the choice for the
person who merges these 12 parents is either to include or not include
that line.  If the line was included, it is not interesting.  If the line
was deleted (which is different from what happened in *1*), it is not
interesting, either.

One thing to note is "have only two choices to pick from" does not have a
direct connection to two-parent-ness.  In a two-parent merge (di-pus?), by
definition you cannot have more than two choices, but that is not any
different from a Dodecapus that has only two groups of parents.  Most
octopus merges have only two groups of parents like the "merge from hell"
does when we talk about individual paths (otherwise it would be very
painful to resolve so it is not done in practice).

[Reference]

*1* http://article.gmane.org/gmane.comp.version-control.git/15487

  reply	other threads:[~2008-07-22 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 16:19 [PATCH] bring description of git diff --cc up to date Jonathan Nieder
2008-07-22 17:09 ` Junio C Hamano
2008-07-22 21:21   ` Junio C Hamano [this message]
2008-07-22 23:27     ` Jonathan Nieder
2008-07-23  0:36       ` Junio C Hamano
2008-07-23  3:55         ` Jonathan Nieder
2008-07-23 23:15           ` Junio C Hamano
2008-07-24  0:35             ` Jonathan Nieder
  -- strict thread matches above, loose matches on Subject: below --
2008-07-21 18:27 Jonathan Nieder
2008-07-22  6:41 ` 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=7vd4l5lio1.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=david@dgreaves.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@uchicago.edu \
    /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).