summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-09-03 13:49:28 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-03 13:49:28 -0700
commit0ba5a0b3ba34270b2b57b75f4cce8454a7cc5eeb (patch)
treeaa213172c369a9f33f1db08a13128564d19b791e /sequencer.c
parentMerge branch 'cb/ci-use-upload-artifacts-v1' (diff)
parentrebase --continue: remove .git/MERGE_MSG (diff)
downloadtgif-0ba5a0b3ba34270b2b57b75f4cce8454a7cc5eeb.tar.xz
Merge branch 'pw/rebase-skip-final-fix'
Checking out all the paths from HEAD during the last conflicted step in "git rebase" and continuing would cause the step to be skipped (which is expected), but leaves MERGE_MSG file behind in $GIT_DIR and confuses the next "git commit", which has been corrected. * pw/rebase-skip-final-fix: rebase --continue: remove .git/MERGE_MSG rebase --apply: restore some tests t3403: fix commit authorship
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 1ceb4c0d7f..7d552d635c 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -4716,6 +4716,9 @@ static int commit_staged_changes(struct repository *r,
refs_delete_ref(get_main_ref_store(r), "",
"CHERRY_PICK_HEAD", NULL, 0))
return error(_("could not remove CHERRY_PICK_HEAD"));
+ if (unlink(git_path_merge_msg(r)) && errno != ENOENT)
+ return error_errno(_("could not remove '%s'"),
+ git_path_merge_msg(r));
if (!final_fixup)
return 0;
}