Skip to content

Commit

Permalink
rebase -i: include MERGE_HEAD into files to clean up
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dscho committed Nov 15, 2018
1 parent 769f8a8 commit 94e041a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sequencer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3434,6 +3434,7 @@ static int pick_commits(struct todo_list *todo_list, struct replay_opts *opts)
unlink(rebase_path_author_script());
unlink(rebase_path_stopped_sha());
unlink(rebase_path_amend());
unlink(git_path_merge_head(the_repository));
delete_ref(NULL, "REBASE_HEAD", NULL, REF_NO_DEREF);
}
if (item->command <= TODO_SQUASH) {
Expand Down Expand Up @@ -3790,6 +3791,7 @@ static int commit_staged_changes(struct replay_opts *opts,
opts, flags))
return error(_("could not commit staged changes."));
unlink(rebase_path_amend());
unlink(git_path_merge_head(the_repository));
if (final_fixup) {
unlink(rebase_path_fixup_msg());
unlink(rebase_path_squash_msg());
Expand Down

0 comments on commit 94e041a

Please sign in to comment.