summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-02-24 13:25:52 -0800
committerJunio C Hamano <gitster@pobox.com>2016-02-24 13:25:52 -0800
commite6a6a768ca472afed90adbbd786e5c04fff6be7b (patch)
tree24e3f08992b8d7135cf703a013c591f41018757b /sha1_name.c
parent7c0da37d7b0e09c199788191b322bf45fd003e3c (diff)
parentaac4fac1689f7d1414523d2ac96f1c737ee53b71 (diff)
downloadgit-e6a6a768ca472afed90adbbd786e5c04fff6be7b.tar.gz
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
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 89918ca158..d0f844db89 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -892,12 +892,12 @@ static int get_sha1_oneline(const char *prefix, unsigned char *sha1,
prefix++;
negative = 1;
} else if (prefix[0] != '!') {
- die ("Invalid search pattern: %s", prefix);
+ return -1;
}
}
if (regcomp(&regex, prefix, REG_EXTENDED))
- die("Invalid search pattern: %s", prefix);
+ return -1;
for (l = list; l; l = l->next) {
l->item->object.flags |= ONELINE_SEEN;