Merge branch 'nd/dwim-wildcards-as-pathspecs'
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Feb 2016 21:25:52 +0000 (13:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Feb 2016 21:25:52 +0000 (13:25 -0800)
"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

1  2 
builtin/checkout.c
setup.c
sha1_name.c
Simple merge
diff --cc setup.c
Simple merge
diff --cc sha1_name.c
index 89918ca158379a02368b0604b14465fa14855c8e,6a2195fcc1c29006b27305fd4d1d22976e752cdc..d0f844db897751adca937578185c7421095bbc1e
@@@ -886,14 -857,9 +886,14 @@@ static int get_sha1_oneline(const char 
        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(&regex, prefix, REG_EXTENDED))