summaryrefslogtreecommitdiff
path: root/branch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-06-13 20:19:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-13 20:19:41 (GMT)
commitc4a38d161cbd3308825d7871d0f84f769aad04ab (patch)
tree7c2ea40857b1242030eff1a3cc4548941a152def /branch.c
parent89d1b573d73e7c93f2190a08ed9430f42104c10b (diff)
parentf3f8311ec76f9bcdc7e26a125e585eb4e473a8d2 (diff)
downloadgit-c4a38d161cbd3308825d7871d0f84f769aad04ab.zip
git-c4a38d161cbd3308825d7871d0f84f769aad04ab.tar.gz
git-c4a38d161cbd3308825d7871d0f84f769aad04ab.tar.bz2
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()
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/branch.c b/branch.c
index a594cc2..e70838f 100644
--- a/branch.c
+++ b/branch.c
@@ -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)