diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-03 08:43:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-03 08:43:03 -0700 |
commit | f1ad05f3a524a8750533d8263ceb584a9e7ec573 (patch) | |
tree | 9a7c452694f2718b34ddebf32aacf5a373203d5c /builtin/grep.c | |
parent | 8f780ca9be58d748c79e11b8dccad9474f4d1a19 (diff) | |
parent | c29c46fa2e21e608ce2e603649af5bf38e7969c2 (diff) | |
download | git-f1ad05f3a524a8750533d8263ceb584a9e7ec573.tar.gz |
Merge branch 'jk/fully-peeled-packed-ref' into maint-1.8.1
* jk/fully-peeled-packed-ref:
pack-refs: add fully-peeled trait
pack-refs: write peeled entry for non-tags
use parse_object_or_die instead of die("bad object")
avoid segfaults on parse_object failure
Diffstat (limited to 'builtin/grep.c')
-rw-r--r-- | builtin/grep.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 0e1b6c860e..e8f0f92cf7 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -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; } |