Re: [PATCH 26/31] rebase: remember strategy and strategy options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 4 Jan 2011, Thomas Rast wrote:

> Martin von Zweigbergk wrote:
> > How to add support for strategy options to interactive rebase?
> 
> AFAICS rebase -i currently only uses the strategy when dealing with
> multiple parents, i.e., in --preserve-merges mode.  I think
> git-cherry-pick needs to learn about the -s and -X options, and then
> it'll be a simple matter of passing them along.

I just saw that Jonathan has actually implemented that support in
git-cherry-pick. It is currently in pu.

I asked just because the merge strategy is currently passed to the
call to 'git merge' in git-rebase--interactive.sh (when dealing with
multiple parents, as you said), so it seems like it would make sense
to pass any merge options there as well.

Come to think of it, doesn't the merge option when passed to 'git
rebase -i' mean something quite different compared to when it is
passed to 'git rebase -m'? For interactive rebase, the 'ours' side
refers to the upstream, but in the case of merge-based rebase, it
refers to one branch in the branch-to-be-rebased, no? In that case,
should the merge strategy even be passed to 'git merge' when dealing
with multiple parents? Is it likely that one would want to use the
same strategy for both things? Am I just not thinking straight?

Some history:

The command line option '-s' was there from the inception of
interactive rebase in 1b1dce4 (Teach rebase an interactive mode,
2007-06-25) and back then it was passed to git-cherry-pick, which just
ignored it.

Since f09c9b8 (Teach rebase -i about --preserve-merges, 2007-06-25),
the strategy has been passed to git-merge as well.

Since 2a9c53e (git-rebase--interactive.sh: Don't pass a strategy to
git-cherry-pick., 2007-10-31), the strategy has only been passed to
git-merge, because it was ignored by git-cherry-pick.


Anyway, I'll leave any changes related to this outside of the current
series.


/Martin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]