summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorStephan Beyer <s-beyer@gmx.net>2008-07-16 03:51:49 +0200
committerJunio C Hamano <gitster@pobox.com>2008-07-16 15:13:53 -0700
commit1c5fa0a179a76f13a6970a281ad876cff44fd8ee (patch)
treedf551946fd352860a4618507747597499aa85771 /git-rebase--interactive.sh
parent01941bd54387aee029315d565f0bc1a5b9c5541a (diff)
downloadgit-1c5fa0a179a76f13a6970a281ad876cff44fd8ee.tar.gz
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>
Diffstat (limited to 'git-rebase--interactive.sh')
-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