Merge branch 'jc/perl-cat-blob'
[gitweb.git] / builtin / grep.c
index 0e1b6c860e18c6c47f343fad885cbd24f641862e..8025964987553b8f1ef21b8319b2085d6d31bb0c 100644 (file)
@@ -823,6 +823,8 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                        struct object *object = parse_object(sha1);
                        if (!object)
                                die(_("bad object %s"), arg);
+                       if (!seen_dashdash)
+                               verify_non_filename(prefix, arg);
                        add_object_array(object, arg, &list);
                        continue;
                }