X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=builtin-show-ref.c;h=a323633e296cef1797ab1d218cea83c891bc3b8d;hb=d1f128b0509dce8b492c233b36131f096fd71274;hp=65051d14fde44c14d12099df656ac423bc1c347e;hpb=6e863d6d129a1b6a13c66d0bb03f3d43db6c51fe;p=git.git diff --git a/builtin-show-ref.c b/builtin-show-ref.c index 65051d14f..a323633e2 100644 --- a/builtin-show-ref.c +++ b/builtin-show-ref.c @@ -86,6 +86,9 @@ match: sha1_to_hex(sha1)); if (obj->type == OBJ_TAG) { obj = deref_tag(obj, refname, 0); + if (!obj) + die("git-show-ref: bad tag at ref %s (%s)", refname, + sha1_to_hex(sha1)); hex = find_unique_abbrev(obj->sha1, abbrev); printf("%s %s^{}\n", hex, refname); }