All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nanako Shiraishi <nanako3@lavabit.com>
To: "Raimund Berger" <raimund.berger@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Newbie question regarding 3way merge order.
Date: Sun, 01 Feb 2009 06:45:43 +0900	[thread overview]
Message-ID: <20090201064543.6117@nanako3.lavabit.com> (raw)
In-Reply-To: <87myd7bo8f.fsf@gigli.quasi.internal>

Quoting "Raimund Berger" <raimund.berger@gmail.com> writes:

> I'm myself, especially since a conflicting rebase leaves the index in an
> "unmerged" state. Much like a regular merge does. It's still all
> assumptions though, or maybe I'm missing documentation .... (?)

The rebase command you run with neither -m nor -i option replays
your work on top of the upstream by running git-am with the --3way
option.

This commit introduced the feature.

commit 7f59dbbb8f8d479c1d31453eac06ec765436a780
Author: Junio C Hamano <junkio@cox.net>
Date:   Mon Nov 14 00:41:53 2005 -0800

    Rewrite rebase to use git-format-patch piped to git-am.
    
    The current rebase implementation finds commits in our tree but
    not in the upstream tree using git-cherry, and tries to apply
    them using git-cherry-pick (i.e. always use 3-way) one by one.
    
    Which is fine, but when some of the changes do not apply
    cleanly, it punts, and punts badly.

    [omitting the rest]

The message talks about what was wrong with the original, what
benefit it gives the users, and how to use it, but it doesn't
discuss how the magic works in detail.

Junio much later describes how it works, taking a real-world example
in this message:

http://thread.gmane.org/gmane.comp.version-control.git/46569/focus=46609

In short, it works by applying your changes as patches but when a
patch doesn't apply it falls back to a simplified three-way merge.

http://thread.gmane.org/gmane.comp.version-control.git/100579/focus=100602

I think Junio misremembered the history in his last message in the thread.
He says that rebase was originally a format-patch piped to am, but
before the commit 7f59dbbb8f8d479c1d31453eac06ec765436a780 it was
done by a series of cherry-pick.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

  reply	other threads:[~2009-01-31 21:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 22:25 Newbie question regarding 3way merge order Raimund Berger
2009-01-30 11:37 ` Raimund Berger
2009-01-30 17:31 ` Sitaram Chamarty
2009-01-30 19:09   ` Raimund Berger
2009-01-31  0:32     ` Sitaram Chamarty
2009-01-31 13:26       ` Raimund Berger
2009-01-31 21:45         ` Nanako Shiraishi [this message]
2009-02-01 14:13           ` Raimund Berger
2009-02-01 19:22   ` Junio C Hamano
2009-02-02  1:50     ` Sitaram Chamarty
2009-02-02 14:58     ` Raimund Berger
2009-02-02 16:10       ` Johannes Sixt
2009-02-02 18:15         ` Raimund Berger
2009-02-03  7:21           ` Johannes Sixt
2009-01-31  0:57 ` Nanako Shiraishi
2009-01-31 13:14   ` Raimund Berger

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=20090201064543.6117@nanako3.lavabit.com \
    --to=nanako3@lavabit.com \
    --cc=git@vger.kernel.org \
    --cc=raimund.berger@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.