submodule: export sanitized GIT_CONFIG_PARAMETERS
[gitweb.git] / sha1_name.c
index 89918ca158379a02368b0604b14465fa14855c8e..d0f844db897751adca937578185c7421095bbc1e 100644 (file)
@@ -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;