git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Roman.Shaposhnick@Sun.COM
Cc: git@vger.kernel.org
Subject: Re: overly smart rebase - bug or feature?
Date: Wed, 12 Nov 2008 14:04:35 -0800	[thread overview]
Message-ID: <7v63msmwi4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20081112213920.GB5018@sun.com> (Fedor Sergeev's message of "Thu, 13 Nov 2008 00:39:21 +0300")

Fedor Sergeev <Fedor.Sergeev@Sun.COM> writes:

> Please, correct me if I'm wrong:
>
>   - by default rebase uses "simplified" merge, which (roughly speaking) 
>     simply goes around patching parent with changes from either branches A and B
>
>   - rebase -m applies 'recursive' merge (default merge strategy) which is 
>     kind of smarter and determines a conflict in my case
>
>   - literally the same happens when I do merge instead of rebase 

If "the same" means "always use 'recursive' merge, without 'am -3'
(mis)behaviour seen in rebase", then yes.

>   - cherry-pick fails just because "patch B" can not apply to A and that is
>     literally why rebase started falling out to *some* merge first hand

I do not know about this part.  Rebase _conceptually_ does cherry-pick but
uses a different implementation.

> If the above is true then can you, please, answer the following questions:

I'll answer the one that cannot be answered without knowing history.  I
suspect answers to your other questions are found in the doc set.

>   - does rebase perform simplified merge only because of speed considerations?

Historical accident.  Originally rebase was only "format-patch | am",
i.e. lift a patch from the commits to be rebased, apply them in order.

Later, "am -3" was invented that allows you to apply patches with fuzz by
using 3-way merge at the content level, which was successfull and rebase
was taught about using it.

      reply	other threads:[~2008-11-12 22:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 21:23 overly smart rebase - bug or feature? Fedor Sergeev
2008-11-10 23:14 ` Junio C Hamano
2008-11-10 23:31   ` Avery Pennarun
2008-11-10 23:36   ` Fedor Sergeev
2008-11-10 23:57     ` Junio C Hamano
2008-11-12 21:39   ` Fedor Sergeev
2008-11-12 22:04     ` 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=7v63msmwi4.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Roman.Shaposhnick@Sun.COM \
    --cc=git@vger.kernel.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).