"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
regex_t regex;
if (prefix[0] == '!') {
- if (prefix[1] != '!')
- return -1;
prefix++;
- die ("Invalid search pattern: %s", prefix);
+
+ if (prefix[0] == '-') {
+ prefix++;
+ negative = 1;
+ } else if (prefix[0] != '!') {
++ return -1;
+ }
}
if (regcomp(®ex, prefix, REG_EXTENDED))