Merge branch 'nd/worktree-add-B'
[gitweb.git] / builtin / checkout.c
index 5af84a3118d20da437d3e08c1667f76dc2f57845..cfa66e25eb0838ba70d87d3008c6d3c57e363bd1 100644 (file)
@@ -982,7 +982,8 @@ static int parse_branchname_arg(int argc, const char **argv,
                 */
                int recover_with_dwim = dwim_new_local_branch_ok;
 
-               if (check_filename(NULL, arg) && !has_dash_dash)
+               if (!has_dash_dash &&
+                   (check_filename(NULL, arg) || !no_wildcard(arg)))
                        recover_with_dwim = 0;
                /*
                 * Accept "git checkout foo" and "git checkout foo --"