merge: refuse to create too cool a merge by default
[gitweb.git] / builtin / checkout.c
index e8110a9243f648129ffbea0de2af039ad7791aa1..d53ab75ac9a078c821ed5112643ee896fed35a88 100644 (file)
@@ -981,7 +981,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 --"