Merge branch 'md/url-parse-harden'
[gitweb.git] / branch.c
index 643694542a51634e0bc5cbef92226913d16ccbe7..e70838fb872f98820a641ccaccc06fd4c0c381f7 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -269,7 +269,7 @@ void create_branch(struct repository *r,
        }
 
        real_ref = NULL;
-       if (get_oid(start_name, &oid)) {
+       if (get_oid_mb(start_name, &oid)) {
                if (explicit_tracking) {
                        if (advice_set_upstream_failure) {
                                error(_(upstream_missing), start_name);
@@ -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)