Skip to content

Commit 69c9220

Browse files
dschogitster
authored andcommitted
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]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 85f8d9d commit 69c9220

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
@@ -3459,6 +3459,7 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
34593459
unlink(rebase_path_author_script());
34603460
unlink(rebase_path_stopped_sha());
34613461
unlink(rebase_path_amend());
3462+
unlink(git_path_merge_head(the_repository));
34623463
delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
34633464

34643465
if (item->command == TODO_BREAK)
@@ -3829,6 +3830,7 @@ static int commit_staged_changes(struct replay_opts *opts,
38293830
opts, flags))
38303831
return error(_("could not commit staged changes."));
38313832
unlink(rebase_path_amend());
3833+
unlink(git_path_merge_head(the_repository));
38323834
if (final_fixup) {
38333835
unlink(rebase_path_fixup_msg());
38343836
unlink(rebase_path_squash_msg());

0 commit comments

Comments
 (0)