Merge branch 'jk/checkout-attribute-lookup' into maint-1.8.1
[gitweb.git] / builtin / grep.c
index 0e1b6c860e18c6c47f343fad885cbd24f641862e..e8f0f92cf739c87c19d2be1722b6093ddbed7330 100644 (file)
@@ -820,9 +820,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                unsigned char sha1[20];
                /* Is it a rev? */
                if (!get_sha1(arg, sha1)) {
-                       struct object *object = parse_object(sha1);
-                       if (!object)
-                               die(_("bad object %s"), arg);
+                       struct object *object = parse_object_or_die(sha1, arg);
                        add_object_array(object, arg, &list);
                        continue;
                }