+ html_txt(name);
+ html("</td><td colspan='3'>");
+ htmlf("*** bad ref %s ***", sha1_to_hex(ref->object->sha1));
+ html("</td></tr>\n");
+ }
+}
+
+static void print_tag_header()
+{
+ html("<tr class='nohover'><th class='left'>Tag</th>"
+ "<th class='left'>Age</th>"
+ "<th class='left'>Author</th>"
+ "<th class='left'>Reference</th></tr>\n");
+ header = 1;
+}
+
+static int print_tag(struct refinfo *ref)
+{
+ struct tag *tag;
+ struct taginfo *info;
+ char *url, *name = (char *)ref->refname;
+
+ if (ref->object->type == OBJ_TAG) {
+ tag = lookup_tag(ref->object->sha1);
+ if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag)))
+ return 2;
+ html("<tr><td>");
+ url = cgit_pageurl(cgit_query_repo, "tag",
+ fmt("id=%s", name));
+ html_link_open(url, NULL, NULL);
+ html_txt(name);
+ html_link_close();
+ html("</td><td>");
+ if (info->tagger_date > 0)
+ cgit_print_age(info->tagger_date, -1, NULL);