Skip to content

Commit 94e041a

Browse files
committed
rebase -i: include MERGE_HEAD into files to clean up
Every once in a while, the interactive rebase makes sure that no stale files are lying around. These days, we need to include MERGE_HEAD into that set of files, as the `merge` command will generate them. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 769f8a8 commit 94e041a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sequencer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3434,6 +3434,7 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
34343434
unlink(rebase_path_author_script());
34353435
unlink(rebase_path_stopped_sha());
34363436
unlink(rebase_path_amend());
3437+
unlink(git_path_merge_head(the_repository));
34373438
delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
34383439
}
34393440
if (item->command <= TODO_SQUASH) {
@@ -3790,6 +3791,7 @@ static int commit_staged_changes(struct replay_opts *opts,
37903791
opts, flags))
37913792
return error(_("could not commit staged changes."));
37923793
unlink(rebase_path_amend());
3794+
unlink(git_path_merge_head(the_repository));
37933795
if (final_fixup) {
37943796
unlink(rebase_path_fixup_msg());
37953797
unlink(rebase_path_squash_msg());

0 commit comments

Comments
 (0)