diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-09-17 08:48:10 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-17 08:48:10 +0400 |
commit | c103e9529c8a95b5acf4747cfe06b2f6adedab71 (patch) | |
tree | c57aadfd0da7010b5a916e21dd3b4d239b28ac62 /builtin | |
parent | 26e4266f2fee3454370885ff480b38d045ca1731 (diff) | |
parent | fa79937675600ad5dda5031c532097a0461d843e (diff) |
Merge branch 'ci/forbid-unwanted-current-branch-update'
* ci/forbid-unwanted-current-branch-update:
branch --set-upstream: regression fix
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/branch.c | 2 | ||||
-rw-r--r-- | builtin/checkout.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/builtin/branch.c b/builtin/branch.c index aa705a0fb0..f49596f826 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -566,7 +566,7 @@ static void rename_branch(const char *oldname, const char *newname, int force) die(_("Invalid branch name: '%s'"), oldname); } - validate_new_branchname(newname, &newref, force); + validate_new_branchname(newname, &newref, force, 0); strbuf_addf(&logmsg, "Branch: renamed %s to %s", oldref.buf, newref.buf); diff --git a/builtin/checkout.c b/builtin/checkout.c index 3bb652591b..5e356a6c61 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1073,7 +1073,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix) if (opts.new_branch) { struct strbuf buf = STRBUF_INIT; - opts.branch_exists = validate_new_branchname(opts.new_branch, &buf, !!opts.new_branch_force); + opts.branch_exists = validate_new_branchname(opts.new_branch, &buf, + !!opts.new_branch_force, 0); strbuf_release(&buf); } |