Code

builtin-fetch.c (store_updated_refs): Honor update_local_ref() return value
[git.git] / builtin-show-ref.c
index 65051d14fde44c14d12099df656ac423bc1c347e..a323633e296cef1797ab1d218cea83c891bc3b8d 100644 (file)
@@ -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);
                }