X-Git-Url: https://git.cameronkatri.com/cgit.git/blobdiff_plain/f0047d2d943788fed2666e1d20c1e0d3c16701d5..d889cae811f27a052317ac5aea23890cba414760:/ui-refs.c
diff --git a/ui-refs.c b/ui-refs.c
index 7b95e8b..456f610 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -90,31 +90,6 @@ static void print_tag_header(void)
"
Age | \n");
}
-static void print_tag_downloads(const struct cgit_repo *repo, const char *ref)
-{
- const struct cgit_snapshot_format* f;
- const char *basename;
- struct strbuf filename = STRBUF_INIT;
- size_t prefixlen;
-
- basename = cgit_snapshot_prefix(repo);
- if (starts_with(ref, basename))
- strbuf_addstr(&filename, ref);
- else
- cgit_compose_snapshot_prefix(&filename, basename, ref);
- prefixlen = filename.len;
- for (f = cgit_snapshot_formats; f->suffix; f++) {
- if (!(repo->snapshots & f->bit))
- continue;
- strbuf_setlen(&filename, prefixlen);
- strbuf_addstr(&filename, f->suffix);
- cgit_snapshot_link(filename.buf, NULL, NULL, NULL, NULL, filename.buf);
- html(" ");
- }
-
- strbuf_release(&filename);
-}
-
static int print_tag(struct refinfo *ref)
{
struct tag *tag = NULL;
@@ -134,7 +109,7 @@ static int print_tag(struct refinfo *ref)
cgit_tag_link(name, NULL, NULL, name);
html("");
if (ctx.repo->snapshots && (obj->type == OBJ_COMMIT))
- print_tag_downloads(ctx.repo, name);
+ cgit_print_snapshot_links(ctx.repo, name, " ");
else
cgit_object_link(obj);
html(" | ");
@@ -161,7 +136,7 @@ static int print_tag(struct refinfo *ref)
return 0;
}
-static void print_refs_link(char *path)
+static void print_refs_link(const char *path)
{
html(" | ");
cgit_refs_link("[...]", NULL, NULL, ctx.qry.head, NULL, path);
|