summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Stephan Beyer <s-beyer@gmx.net>2008-07-16 03:51:49 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-07-16 15:13:53 -0700
commit1c5fa0a179a76f13a6970a281ad876cff44fd8ee (patch)
treedf551946fd352860a4618507747597499aa85771
parentt7600-merge: Use test_expect_failure to test option parsing (diff)
downloadtgif-1c5fa0a179a76f13a6970a281ad876cff44fd8ee.tar.xz
rebase-i: keep old parents when preserving merges
When "rebase -i -p" tries to preserve merges of unrelated branches, it lost some parents: - When you have more than two parents, the commit in the new history ends up with fewer than expected number of parents and this breakage goes unnoticed; - When you are rebasing a merge with two parents and one is lost, the command tries to cherry-pick the original merge commit, and the command fails. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-rebase--interactive.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index a64d9d57ab..e3f65bd880 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -162,6 +162,8 @@ pick_one_preserving_merges () {
new_parents="$new_parents $new_p"
;;
esac
+ else
+ new_parents="$new_parents $p"
fi
done
case $fast_forward in