summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
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;