mirror of
https://git.zx2c4.com/cgit
synced 2025-07-30 23:55:28 +02:00
Add git_log_link() and fix bug in generic repolink function
The generic repolink function compared head with cgit_query_head, which almost always would be the same pointer. The test now compares with repo.defbranch, which is the wanted behavour. Bug discovered while adding cgit_log_link(), so this commit also contain that change. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
426032f767
commit
48c487d72d
5 changed files with 24 additions and 20 deletions
|
@ -25,11 +25,7 @@ static int cgit_print_branch_cb(const char *refname, const unsigned char *sha1,
|
|||
if (commit && !parse_commit(commit)){
|
||||
info = cgit_parse_commit(commit);
|
||||
html("<tr><td>");
|
||||
url = cgit_pageurl(cgit_query_repo, "log",
|
||||
fmt("h=%s", refname));
|
||||
html_link_open(url, NULL, NULL);
|
||||
html_txt(buf);
|
||||
html_link_close();
|
||||
cgit_log_link(refname, NULL, NULL, refname, NULL, NULL);
|
||||
html("</td><td>");
|
||||
cgit_print_age(commit->date, -1, NULL);
|
||||
html("</td><td>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue