unlink(git_path_merge_rr(r));
unlink(git_path_merge_msg(r));
unlink(git_path_merge_mode(r));
- unlink(git_path_cherry_pick_head(r));
- unlink(git_path_revert_head(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)
* Return 1 if the named branch already exists; return 0 otherwise.
* Fill ref with the full refname for the branch.
*/
-extern int validate_new_branchname(const char *name, struct strbuf *ref, int force);
+int validate_new_branchname(const char *name, struct strbuf *ref, int force);
+ /*
+ * Remove information about the merge state on the current
+ * branch. (E.g., MERGE_HEAD)
+ */
+ void remove_merge_branch_state(struct repository *r);
+
/*
* Remove information about the state of working on the current
* branch. (E.g., MERGE_HEAD)
#include "packfile.h"
#include "tag.h"
#include "alias.h"
+ #include "branch.h"
#include "commit-reach.h"
+#include "wt-status.h"
#define DEFAULT_TWOHEAD (1<<0)
#define DEFAULT_OCTOPUS (1<<1)