Merge branch 'nd/dwim-wildcards-as-pathspecs'
"git show 'HEAD:Foo[BAR]Baz'" did not interpret the argument as a rev, i.e. the object named by the the pathname with wildcard characters in a tree object. * nd/dwim-wildcards-as-pathspecs: get_sha1: don't die() on bogus search strings check_filename: tighten dwim-wildcard ambiguity checkout: reorder check_filename conditional
This commit is contained in:
6
setup.c
6
setup.c
@ -139,9 +139,7 @@ int check_filename(const char *prefix, const char *arg)
|
||||
if (arg[2] == '\0') /* ":/" is root dir, always exists */
|
||||
return 1;
|
||||
name = arg + 2;
|
||||
} else if (!no_wildcard(arg))
|
||||
return 1;
|
||||
else if (prefix)
|
||||
} else if (prefix)
|
||||
name = prefix_filename(prefix, strlen(prefix), arg);
|
||||
else
|
||||
name = arg;
|
||||
@ -202,7 +200,7 @@ void verify_filename(const char *prefix,
|
||||
{
|
||||
if (*arg == '-')
|
||||
die("bad flag '%s' used after filename", arg);
|
||||
if (check_filename(prefix, arg))
|
||||
if (check_filename(prefix, arg) || !no_wildcard(arg))
|
||||
return;
|
||||
die_verify_filename(prefix, arg, diagnose_misspelt_rev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user