]> git.cameronkatri.com Git - cgit.git/blobdiff - ui-shared.c
cgitrc.5: document new signature notes
[cgit.git] / ui-shared.c
index e8c0723c75fc84958c230b1eee3824382ca69f66..066a470e5dd419b503bd4ff80646028079f844ad 100644 (file)
@@ -775,6 +775,8 @@ void cgit_print_docstart(void)
                cgit_add_clone_urls(print_rel_vcs_link);
        if (ctx.cfg.head_include)
                html_include(ctx.cfg.head_include);
+       if (ctx.repo && ctx.repo->extra_head_content)
+               html(ctx.repo->extra_head_content);
        html("</head>\n");
        html("<body>\n");
        if (ctx.cfg.header)
@@ -977,8 +979,6 @@ static void print_header(void)
        } else {
                if (ctx.cfg.root_desc)
                        html_txt(ctx.cfg.root_desc);
-               else if (ctx.cfg.index_info)
-                       html_include(ctx.cfg.index_info);
        }
        html("</td></tr></table>\n");
 }
@@ -1114,7 +1114,7 @@ void cgit_compose_snapshot_prefix(struct strbuf *filename, const char *base,
 void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *ref,
                               const char *separator)
 {
-       const struct cgit_snapshot_formatf;
+       const struct cgit_snapshot_format *f;
        struct strbuf filename = STRBUF_INIT;
        const char *basename;
        size_t prefixlen;
@@ -1139,6 +1139,13 @@ void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *ref,
                        cgit_snapshot_link("sig", NULL, NULL, NULL, NULL,
                                           filename.buf);
                        html(")");
+               } else if (starts_with(f->suffix, ".tar") && cgit_snapshot_get_sig(ref, &cgit_snapshot_formats[0])) {
+                       strbuf_setlen(&filename, strlen(filename.buf) - strlen(f->suffix));
+                       strbuf_addstr(&filename, ".tar.asc");
+                       html(" (");
+                       cgit_snapshot_link("sig", NULL, NULL, NULL, NULL,
+                                          filename.buf);
+                       html(")");
                }
                html(separator);
        }