Re: [PATCH 3/3] git-rebase--interactive.sh: Make 3-way merge strategies work for -p.

Previous thread: Re: remote#branch by Jakub Narebski on Tuesday, October 30, 2007 - 8:12 pm. (20 messages)

Next thread: none
To: <Johannes.Schindelin@...>
Cc: Björn Steinbrink <B.Steinbrink@...>, <git@...>
Date: Tuesday, October 30, 2007 - 10:20 pm

For the --strategy/-s option, git-rebase--interactive.sh dropped the
parameter which it was trying to parse.

Signed-off-by: Bj

To: <Johannes.Schindelin@...>
Cc: Björn Steinbrink <B.Steinbrink@...>, <git@...>
Date: Tuesday, October 30, 2007 - 10:20 pm

git-cherry-pick doesn't support a strategy paramter, so don't pass one.
This means that --strategy for interactive rebases is a no-op for
anything but merge commits, but that's still better than being broken. A
correct fix would probably need to port the --merge behaviour from plain
git-rebase.sh, but I have no clue how to integrate that cleanly.

Signed-off-by: Bj

To: <Johannes.Schindelin@...>
Cc: Björn Steinbrink <B.Steinbrink@...>, <git@...>
Date: Tuesday, October 30, 2007 - 10:20 pm

git-rebase--interactive.sh used to pass all parents of a merge commit to
git-merge, which means that we have at least 3 heads to merge: HEAD,
first parent and second parent. So 3-way merge strategies like recursive
wouldn't work.

Fortunately, we have checked out the first parent right before the merge
anyway, so that is HEAD. Therefore we can drop simply it from the list
of parents, making 3-way strategies work for merge commits with only
two parents.

Signed-off-by: Bj

To: Björn Steinbrink <B.Steinbrink@...>
Cc: <git@...>
Date: Tuesday, October 30, 2007 - 10:42 pm

Hi Bj

To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: <git@...>
Date: Tuesday, October 30, 2007 - 10:53 pm

Hi Dscho,

Actually, I checked first that it's not bash-only (I saw the flames
about that on lkml some time ago, so I've been scared ;-)). Works fine
with dash here and it's in the posix sh specs. See 2.6.2 in
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

Thanks :-)

Björn
-

Previous thread: Re: remote#branch by Jakub Narebski on Tuesday, October 30, 2007 - 8:12 pm. (20 messages)

Next thread: none