diff options
Diffstat (limited to 'branch.c')
-rw-r--r-- | branch.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -271,7 +271,7 @@ void create_branch(struct repository *r, real_ref = NULL; if (get_oid_mb(start_name, &oid)) { if (explicit_tracking) { - if (advice_set_upstream_failure) { + if (advice_enabled(ADVICE_SET_UPSTREAM_FAILURE)) { error(_(upstream_missing), start_name); advise(_(upstream_advice)); exit(1); @@ -294,7 +294,7 @@ void create_branch(struct repository *r, if (explicit_tracking) die(_(upstream_not_branch), start_name); else - real_ref = NULL; + FREE_AND_NULL(real_ref); } break; default: @@ -322,7 +322,7 @@ void create_branch(struct repository *r, transaction = ref_transaction_begin(&err); if (!transaction || ref_transaction_update(transaction, ref.buf, - &oid, forcing ? NULL : &null_oid, + &oid, forcing ? NULL : null_oid(), 0, msg, &err) || ref_transaction_commit(transaction, &err)) die("%s", err.buf); @@ -344,6 +344,7 @@ void remove_merge_branch_state(struct repository *r) unlink(git_path_merge_rr(r)); unlink(git_path_merge_msg(r)); unlink(git_path_merge_mode(r)); + unlink(git_path_auto_merge(r)); save_autostash(git_path_merge_autostash(r)); } |