Merge branch 'jn/push-tests'
[gitweb.git] / builtin / prune.c
index 8cb8b9186a3a268630680e4b224d3767017e1e38..85843d4f1728a907aafab9938b4c827990a7695f 100644 (file)
@@ -149,9 +149,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
                const char *name = *argv++;
 
                if (!get_sha1(name, sha1)) {
-                       struct object *object = parse_object(sha1);
-                       if (!object)
-                               die("bad object: %s", name);
+                       struct object *object = parse_object_or_die(sha1, name);
                        add_pending_object(&revs, object, "");
                }
                else