Merge branch 'cj/doc-quiet' into cj/doc-format
[gitweb.git] / tag.c
diff --git a/tag.c b/tag.c
index 38bf9134f97c18973fe189c8703438f5e1135e49..4470d2bf78e1fbb00d00e487f41daa4373cf48e1 100644 (file)
--- a/tag.c
+++ b/tag.c
@@ -9,7 +9,10 @@ const char *tag_type = "tag";
 struct object *deref_tag(struct object *o, const char *warn, int warnlen)
 {
        while (o && o->type == OBJ_TAG)
-               o = parse_object(((struct tag *)o)->tagged->sha1);
+               if (((struct tag *)o)->tagged)
+                       o = parse_object(((struct tag *)o)->tagged->sha1);
+               else
+                       o = NULL;
        if (!o && warn) {
                if (!warnlen)
                        warnlen = strlen(warn);
@@ -84,12 +87,6 @@ int parse_tag_buffer(struct tag *item, void *data, unsigned long size)
                item->tagged = NULL;
        }
 
-       if (item->tagged && track_object_refs) {
-               struct object_refs *refs = alloc_object_refs(1);
-               refs->ref[0] = item->tagged;
-               set_object_refs(&item->object, refs);
-       }
-
        return 0;
 }