X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/26610aff34b8dbbfa296bb7a9785c39831cfe7e3..09d24d7cd0b7e85633f2f43808b12871bb209d69:/ui-tag.c
diff --git a/ui-tag.c b/ui-tag.c
index 2c216d0..3b11226 100644
--- a/ui-tag.c
+++ b/ui-tag.c
@@ -6,6 +6,8 @@
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-tag.h"
#include "html.h"
@@ -33,9 +35,8 @@ static void print_tag_content(char *buf)
static void print_download_links(char *revname)
{
- html("
| download | ");
- cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,
- revname, ctx.repo->snapshots);
+ html(" |
|---|
| download | ");
+ cgit_print_snapshot_links(ctx.repo, revname, " ");
html(" |
");
}
@@ -49,12 +50,12 @@ void cgit_print_tag(char *revname)
revname = ctx.qry.head;
strbuf_addf(&fullref, "refs/tags/%s", revname);
- if (get_oid(fullref.buf, &oid)) {
+ if (repo_get_oid(the_repository, fullref.buf, &oid)) {
cgit_print_error_page(404, "Not found",
"Bad tag reference: %s", revname);
goto cleanup;
}
- obj = parse_object(&oid);
+ obj = parse_object(the_repository, &oid);
if (!obj) {
cgit_print_error_page(500, "Internal server error",
"Bad object id: %s", oid_to_hex(&oid));
@@ -64,7 +65,7 @@ void cgit_print_tag(char *revname)
struct tag *tag;
struct taginfo *info;
- tag = lookup_tag(&oid);
+ tag = lookup_tag(the_repository, &oid);
if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) {
cgit_print_error_page(500, "Internal server error",
"Bad tag object: %s", revname);
@@ -72,7 +73,7 @@ void cgit_print_tag(char *revname)
}
cgit_print_layout_start();
html("\n");
- htmlf("| tag name | ");
+ html(" |
| tag name | ");
html_txt(revname);
htmlf(" (%s) |
\n", oid_to_hex(&oid));
if (info->tagger_date > 0) {
@@ -92,7 +93,7 @@ void cgit_print_tag(char *revname)
cgit_close_filter(ctx.repo->email_filter);
html("\n");
}
- html("| tagged object | ");
+ html(" |
| tagged object | ");
cgit_object_link(tag->tagged);
html(" |
\n");
if (ctx.repo->snapshots)
@@ -104,10 +105,10 @@ void cgit_print_tag(char *revname)
} else {
cgit_print_layout_start();
html("\n");
- htmlf("| tag name | ");
+ html(" |
| tag name | ");
html_txt(revname);
html(" |
\n");
- html("| tagged object | ");
+ html(" |
| tagged object | ");
cgit_object_link(obj);
html(" |
\n");
if (ctx.repo->snapshots)