aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 0c300be..8f8ee6c 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -1105,11 +1105,15 @@ void cgit_print_snapshot_links(const char *repo, const char *head,
strbuf_release(&filename);
}
-extern void cgit_author_link(char *author)
+extern void cgit_author_link(const char *author, const char *head)
{
char *delim;
- delim = repolink(NULL, NULL, "log", NULL, NULL);
+ if (head) {
+ delim = repolink(NULL, NULL, "log", head, NULL);
+ } else {
+ delim = repolink(NULL, NULL, "log", ctx.qry.head, NULL);
+ }
html(delim);
htmlf("qt=author&q=");
html_url_arg(author);