]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-shared.c
snapshot: strip bit from struct cgit_snapshot_format
[cgit.git] / ui-shared.c
index 9d7ee3d90e424bb69da1eb447bfbaa9cc19de66d..e8c0723c75fc84958c230b1eee3824382ca69f66 100644 (file)
@@ -1127,12 +1127,19 @@ void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *ref,
 
        prefixlen = filename.len;
        for (f = cgit_snapshot_formats; f->suffix; f++) {
-               if (!(repo->snapshots & f->bit))
+               if (!(repo->snapshots & cgit_snapshot_format_bit(f)))
                        continue;
                strbuf_setlen(&filename, prefixlen);
                strbuf_addstr(&filename, f->suffix);
                cgit_snapshot_link(filename.buf, NULL, NULL, NULL, NULL,
                                   filename.buf);
+               if (cgit_snapshot_get_sig(ref, f)) {
+                       strbuf_addstr(&filename, ".asc");
+                       html(" (");
+                       cgit_snapshot_link("sig", NULL, NULL, NULL, NULL,
+                                          filename.buf);
+                       html(")");
+               }
                html(separator);
        }
        strbuf_release(&filename);