diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/grep.c | 4 | ||||
-rw-r--r-- | builtin/prune.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 0654e0b..08ea5fd 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -898,9 +898,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; } diff --git a/builtin/prune.c b/builtin/prune.c index 6cb9944..67ca3d5 100644 --- a/builtin/prune.c +++ b/builtin/prune.c @@ -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 |