git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [Discussion] cherry-picking a merge
Date: Thu, 15 Nov 2007 09:40:22 -0800	[thread overview]
Message-ID: <7vy7cz4dbt.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071115081648.GK14735@spearce.org> (Shawn O. Pearce's message of "Thu, 15 Nov 2007 03:16:49 -0500")

"Shawn O. Pearce" <spearce@spearce.org> writes:

> Junio C Hamano <gitster@pobox.com> wrote:
> ...
>> When you think about it, as long as the topological relationship
>> between A and B is very similar to that of C and B (iow,
>> "merge-base A B" and "merge-base C B" are the same), the effect
>> should be the same as a real merge between B and C, shouldn't it?
>> 
>>   ---o---o---C---A---M
>>       \       \     /
>>        o---o---\---B
>>                 \   \
>>                  `---X
>> 
>> I am wondering if it makes sense to record the result of
>> "cherry-pick -m" as a real merge between the current HEAD and
>> all the other parents of the cherry-picked merge except the one
>> that is named with the <parent-number>.
>
> Yes.

Actually, this turns to be a trick question ;-)

If there was an accidental clean merge between A and B, and a
part of the duplicated same changes in the accidental clean
merge sits between C and A, replaying the difference from A to M
on top of C would not yield the same result as merging B into C.

      reply	other threads:[~2007-11-15 17:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-15  8:00 [Discussion] cherry-picking a merge Junio C Hamano
2007-11-15  8:16 ` Shawn O. Pearce
2007-11-15 17:40   ` Junio C Hamano [this message]

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=7vy7cz4dbt.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /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).