X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/b8be028a309381b83abe924f5e8e01cf02b121a2..86ca02231fc42a629c50abebcae3ea9d4d692979:/ui-shared.c diff --git a/ui-shared.c b/ui-shared.c index 383b8ac..d4376ce 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -163,9 +163,25 @@ void cgit_tree_link(char *name, char *title, char *class, char *head, } void cgit_log_link(char *name, char *title, char *class, char *head, - char *rev, char *path) + char *rev, char *path, int ofs) { - reporevlink("log", name, title, class, head, rev, path); + char *delim; + + delim = repolink(title, class, "log", head, path); + if (rev && strcmp(rev, cgit_query_head)) { + html(delim); + html("id="); + html_attr(rev); + delim = "&"; + } + if (ofs > 0) { + html(delim); + html("ofs="); + htmlf("%d", ofs); + } + html("'>"); + html_txt(name); + html(""); } void cgit_commit_link(char *name, char *title, char *class, char *head, @@ -266,7 +282,7 @@ void cgit_print_docstart(char *title, struct cacheitem *item) html("