diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-03-26 01:01:07 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-03-26 01:01:07 +0400 |
commit | 870987dec752fe2a6752f7813fe1892b5e1a8d32 (patch) | |
tree | 64744e8b48696fb0a27411fdd2966dd8c2928d6e /builtin/grep.c | |
parent | 4e38e9b1d05fb00ad87cba8c44117a537d779c9e (diff) | |
parent | c29c46fa2e21e608ce2e603649af5bf38e7969c2 (diff) |
Merge branch 'jk/fully-peeled-packed-ref'
Not that we do not actively encourage having annotated tags outside
refs/tags/ hierarchy, but they were not advertised correctly to the
ls-remote and fetch with recent version of Git.
* 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 8025964987..159e65d47a 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); if (!seen_dashdash) verify_non_filename(prefix, arg); add_object_array(object, arg, &list); |