Merge branch 'ci/forbid-unwanted-current-branch-update'

* ci/forbid-unwanted-current-branch-update:
  branch --set-upstream: regression fix
This commit is contained in:
Junio C Hamano
2011-09-16 21:48:10 -07:00
5 changed files with 39 additions and 12 deletions

View File

@ -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);
}