diff options
author | lookshe <github@lookshe.org> | 2016-02-01 14:16:35 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2016-02-01 14:16:35 +0100 |
commit | 95be399ab4692a77a818eb2d72e6b4b2e3d821ec (patch) | |
tree | d97df5a79c2ec2404d6a7a0dbb98fae65757dc3b /ui-shared.c | |
parent | fbcdeeb500586d86e829e87f6cdc92cfec81e30e (diff) |
author link with correct branches
Diffstat (limited to 'ui-shared.c')
-rw-r--r-- | ui-shared.c | 8 |
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); |