push: add shorthand for --force-with-lease branch creation
[gitweb.git] / sha1_name.c
index 532db4fdc6dcf905e99470e773a6166be2f903ed..ab5a163c9bab7f5799011b984715ed1ca9deed10 100644 (file)
@@ -881,12 +881,12 @@ static int get_sha1_oneline(const char *prefix, unsigned char *sha1,
 
        if (prefix[0] == '!') {
                if (prefix[1] != '!')
-                       die ("Invalid search pattern: %s", prefix);
+                       return -1;
                prefix++;
        }
 
        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;