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:
@ -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>");
|
||||
|
Reference in New Issue
Block a user