branch --set-upstream: regression fix
[gitweb.git] / builtin / checkout.c
index ddefec053e563dff0e16cd5adb2f8f6d26c77d87..909a334627ccc49c1fe525ef32d88bbc1f52ebdc 100644 (file)
@@ -1072,7 +1072,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);
        }