Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Eric Wong <normalperson@yhbt.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] rebase: Allow merge strategies to be used when rebasing
Date: Wed, 21 Jun 2006 04:01:33 -0700	[thread overview]
Message-ID: <7vac8622nm.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 20060621100138.GA15748@localdomain

Eric Wong <normalperson@yhbt.net> writes:

> Junio C Hamano <junkio@cox.net> wrote:
>>
>> >> 	git-merge-$strategy $cmt^ -- HEAD $cmt
>> >
>> > Changing the 'git-merge $strategy_args "rebase-merge: $cmt" HEAD "$cmt"'
>> > line in call_merge() to this seems to have broken more tests.
>> 
>> Oh, that is to be expected if you changed git-merge -s recursive
>> with git-merge-recursive without other changes.  The former
>> makes a commit (which your original patch later used to create a
>> separate commit chain and discarded); the latter does not make a
>> commit but expects the caller to create a commit out of the
>> resulting index file.
>
> Oops, *smacks head*

Well, but you used it to do the right thing after all ;-).
The patch looks quite good.

>> I was originally hoping that rebasing would just be a matter of
>> listing sequence of commits to be ported onto a new base and
>> running "git-cherry-pick" on each of them in sequence.  Now
>> cherry-pick does not use merge machinery (hence does not use
>> git-merge-recursive), but if we change that then updating rebase
>> would be pretty much straightforward.  It just needs a UI layer
>> to guide the user through recovery process when the merge does
>> not resolve cleanly in the middle, no?
>
> Sounds workable right to me. But then again, a cherry-pick is also a
> case of rebase on a single commit, so we could be using rebase (and its
> recovery code) in cherry-pick, too, right?

Revert and cherry-pick are quite similar operation (the only
difference is that you swap his and pivot when doing revert), so
when you implement cherry-pick as an atomic operation you can
have revert almost for free.  If you have a rebase like you did,
it would be a bit more involved to make it do revert as well.

  parent reply	other threads:[~2006-06-21 11:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-18  3:02 [PATCH] rebase: Allow merge strategies to be used when rebasing Eric Wong
2006-06-18  9:08 ` Junio C Hamano
2006-06-19 21:39   ` Eric Wong
2006-06-19 21:55     ` Junio C Hamano
2006-06-21 10:01       ` Eric Wong
2006-06-21 10:04         ` [PATCH (fixed)] " Eric Wong
2006-06-21 10:04           ` [PATCH 1/3] " Eric Wong
2006-06-21 10:04             ` [PATCH 3/3] rebase: error out for NO_PYTHON if they use recursive merge Eric Wong
2006-06-21 11:01           ` [PATCH (fixed)] rebase: Allow merge strategies to be used when rebasing Junio C Hamano
2006-06-21 11:01         ` Junio C Hamano [this message]
2006-06-18 11:48 ` [PATCH] Add renaming-rebase test 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=7vac8622nm.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox