Skip to content

Commit f5b49ea

Browse files
j6tgitster
authored andcommitted
rebase -i -p: Fix --continue after a merge could not be redone
When a merge that has a conflict was rebased, then rebase stopped to let the user resolve the conflicts. However, thereafter --continue failed because the author-script was not saved. (This is rebase -i's way to preserve a commit's authorship.) This fixes it by doing taking the same failure route after a merge that is also taken after a normal cherry-pick. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 03c4829 commit f5b49ea

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

git-rebase--interactive.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,8 @@ pick_one_preserving_merges () {
256256
output git merge $STRATEGY -m "$msg" \
257257
$new_parents
258258
then
259-
git rerere
260259
printf "%s\n" "$msg" > "$GIT_DIR"/MERGE_MSG
261-
die Error redoing merge $sha1
260+
die_with_patch $sha1 "Error redoing merge $sha1"
262261
fi
263262
;;
264263
*)

t/t3409-rebase-preserve-merges.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ test_expect_success 'rebase -p fakes interactive rebase' '
7575
)
7676
'
7777

78-
test_expect_failure '--continue works after a conflict' '
78+
test_expect_success '--continue works after a conflict' '
7979
(
8080
cd clone2 &&
8181
git fetch &&

0 commit comments

Comments
 (0)