1. Stefan Saasen
  2. git

Commits

Stephan Beyer  committed 1c5fa0a

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>

  • Participants
  • Parent commits 01941bd
  • Branches master

Comments (0)

Files changed (1)

File git-rebase--interactive.sh

View file
  • Ignore whitespace
 				new_parents="$new_parents $new_p"
 				;;
 			esac
+		else
+			new_parents="$new_parents $p"
 		fi
 	done
 	case $fast_forward in