summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-11-12 23:25:59 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-11-13 03:04:00 (GMT)
commit69c92209d2c4d33a25ed79a62a2170c0ff2059e8 (patch)
tree4f314ef5c3c037cc5507879675c7fb421c5a9564 /sequencer.c
parent85f8d9da2182690461e05034a4a697f766bb8eb1 (diff)
downloadgit-69c92209d2c4d33a25ed79a62a2170c0ff2059e8.zip
git-69c92209d2c4d33a25ed79a62a2170c0ff2059e8.tar.gz
git-69c92209d2c4d33a25ed79a62a2170c0ff2059e8.tar.bz2
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 7a9cd81..2f52639 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3459,6 +3459,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_BREAK)
@@ -3829,6 +3830,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());