Diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/ui-atom.c | 12 |
1 file changed, 2 insertions, 10 deletions
diff --git a/source/ui-atom.c b/source/ui-atom.c index 42c7f41..065d5cd 100644 --- a/source/ui-atom.c +++ b/source/ui-atom.c @@ -105,7 +105,6 @@ static void print_entry(struct commit *commit, const char *host) { struct commitinfo *info; char *hex, *pageurl; - char delim = '&'; info = cgit_parse_commit(commit); hex = oid_to_hex(&commit->object.oid); @@ -135,15 +134,8 @@ static void print_entry(struct commit *commit, const char *host) xml_txt(feed_date(info->author_date)); html("</published>\n"); html("<link rel='alternate' type='text/html' href='"); - html(cgit_httpscheme()); - html_attr(host); - pageurl = cgit_pageurl(ctx.repo->url, "commit", NULL); - html_attr(pageurl); - // Without a virtual root the page url is already a query string, so - // the commit id continues it instead of opening one. - if (ctx.cfg.virtual_root) - delim = '?'; - html_attrf("%cid=%s", delim, hex); + pageurl = cgit_pageurl(ctx.repo->url, "commit", cgit_fmt("id=%s", hex)); + html_attrf("%s%s%s", cgit_httpscheme(), host, pageurl); html("'/>\n"); free(pageurl); html("<id>"); |
