Merge branch 'nd/merge-quit'

"git merge" learned "--quit" option that cleans up the in-progress
merge while leaving the working tree and the index still in a mess.

* nd/merge-quit:
  merge: add --quit
  merge: remove drop_save() in favor of remove_merge_branch_state()
This commit is contained in:
Junio C Hamano
2019-06-13 13:19:41 -07:00
5 changed files with 61 additions and 14 deletions

View File

@ -338,14 +338,19 @@ void create_branch(struct repository *r,
free(real_ref);
}
void remove_branch_state(struct repository *r)
void remove_merge_branch_state(struct repository *r)
{
sequencer_post_commit_cleanup(r);
unlink(git_path_merge_head(r));
unlink(git_path_merge_rr(r));
unlink(git_path_merge_msg(r));
unlink(git_path_merge_mode(r));
}
void remove_branch_state(struct repository *r)
{
sequencer_post_commit_cleanup(r);
unlink(git_path_squash_msg(r));
remove_merge_branch_state(r);
}
void die_if_checked_out(const char *branch, int ignore_current_worktree)