From: Junio C Hamano <gitster@pobox.com>
To: Johan Herland <johan@herland.net>
Cc: Antoine Pelisse <apelisse@gmail.com>,
Michael Haggerty <mhagger@alum.mit.edu>,
Jeff King <peff@peff.net>, git <git@vger.kernel.org>
Subject: Re: Premerging topics
Date: Wed, 24 Apr 2013 00:14:57 -0700 [thread overview]
Message-ID: <7vppxkflhq.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CALKQrgd8jZQ__rnAT3wbfx-Y6mg-vrTdam53nS2ya2c=yMcS6Q@mail.gmail.com> (Johan Herland's message of "Wed, 24 Apr 2013 08:22:18 +0200")
Johan Herland <johan@herland.net> writes:
> This raises the same question I recently asked Antoine: For a given
> prepackaged merge <X,Y>, do we assume that it only resolves conflicts
> between the changes introduced in commit X vs. changes introduced in
> commit Y, or do we assume that it resolves conflicts between the
> histories leading up to X and Y, respectively? In other words, does
> <X,Y> _supercede_ earlier pre-merges between the histories leading up
> to X and Y?
That is an interesting question. There are largely two cases.
When you replayed M---F to produce N---F', there may have been no
textual or semantic conflict. Which means that there were no new
reason between A--X and B--Y that necessitates an evil merge. A
later merge between a descendant of X (but not Y) and a descendant
of Y (but not X) can cherry pick the same <A,B> (M---F) on top of a
mechanical merge,
On the other hand, you may have had either a textual or a semantic
conflict when replaying <A,B> on N, and you had to fix up F' for it
to be the correct resolution of merge between X and Y.
---o---o---A---o---X
\ \
\ N---F'
\ /
o---B---o---Y
In such a case, you do want to record the fixed N---F' as the
prepackaged resolution for <X,Y>. Any time later when somebody is
on a branch that has X (but not Y) and merges a branch that has Y
(but not X), that N---F' should be the one to cherry-pick on top of
a mechanical merge O between S and T. What <A,B> (M---F) did is
superseded if you are going to replay <X,Y>.
---o---o---A---o---X----------S
\ \ \ \
\ M--F N---F' O---F''
\ / / /
o---B---o---Y----------T
You can tell that by noticing that A is an ancestor of X and B is an
ancestor of Y. As you said, this is a good way to reduce the number
of prepackaged evil merges that need to be considered.
next prev parent reply other threads:[~2013-04-24 7:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 20:35 Premerging topics (was: [RFD] annnotating a pair of commit objects?) Antoine Pelisse
2013-04-22 9:23 ` Antoine Pelisse
2013-04-23 6:34 ` Johan Herland
2013-04-23 14:51 ` Antoine Pelisse
2013-04-23 23:06 ` Johan Herland
2013-04-24 5:48 ` Premerging topics Junio C Hamano
2013-04-24 6:22 ` Johan Herland
2013-04-24 7:14 ` Junio C Hamano [this message]
2013-04-29 19:06 ` Antoine Pelisse
2013-04-29 22:19 ` Junio C Hamano
2013-04-29 13:04 ` Antoine Pelisse
2013-04-29 15:08 ` Junio C Hamano
2013-04-23 14:53 ` Junio C Hamano
2013-04-23 15:17 ` Antoine Pelisse
2013-04-23 15:29 ` Junio C Hamano
2013-04-23 15:36 ` Antoine Pelisse
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=7vppxkflhq.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=apelisse@gmail.com \
--cc=git@vger.kernel.org \
--cc=johan@herland.net \
--cc=mhagger@alum.mit.edu \
--cc=peff@peff.net \
/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).