author | Lars Hjemli <hjemli@gmail.com> | 2007-06-17 11:57:51 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-06-17 11:57:51 (UTC) |
commit | 48c487d72daef7e71683a85f775db8d36ab20341 (patch) (side-by-side diff) | |
tree | 8770334d7c77bd3e81f42ee12550e6db5febd4d2 /ui-repolist.c | |
parent | 426032f767763b46f462de51d1ebded34f671d79 (diff) | |
download | cgit-48c487d72daef7e71683a85f775db8d36ab20341.zip cgit-48c487d72daef7e71683a85f775db8d36ab20341.tar.gz cgit-48c487d72daef7e71683a85f775db8d36ab20341.tar.bz2 |
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>
-rw-r--r-- | ui-repolist.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 8ade91a..2018dab 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -60,41 +60,39 @@ void cgit_print_repolist(struct cacheitem *item) "<th class='left'>Name</th>" "<th class='left'>Description</th>" "<th class='left'>Owner</th>" "<th class='left'>Idle</th>" "<th>Links</th></tr>\n"); for (i=0; i<cgit_repolist.count; i++) { cgit_repo = &cgit_repolist.repos[i]; if ((last_group == NULL && cgit_repo->group != NULL) || (last_group != NULL && cgit_repo->group == NULL) || (last_group != NULL && cgit_repo->group != NULL && strcmp(cgit_repo->group, last_group))) { html("<tr class='nohover'><td colspan='4' class='repogroup'>"); html_txt(cgit_repo->group); html("</td></tr>"); last_group = cgit_repo->group; } htmlf("<tr><td class='%s'>", cgit_repo->group ? "sublevel-repo" : "toplevel-repo"); html_link_open(cgit_repourl(cgit_repo->url), NULL, NULL); html_txt(cgit_repo->name); html_link_close(); html("</td><td>"); html_ntxt(cgit_max_repodesc_len, cgit_repo->desc); html("</td><td>"); html_txt(cgit_repo->owner); html("</td><td>"); print_modtime(cgit_repo); html("</td><td>"); html_link_open(cgit_repourl(cgit_repo->url), "Summary", "button"); html("S</a>"); - html_link_open(cgit_pageurl(cgit_repo->name, "log", NULL), - "Log", "button"); - html("L</a>"); + cgit_log_link("L", "Log", "button", NULL, NULL, NULL); cgit_tree_link("F", "Files", "button", NULL, NULL, NULL); html("</td></tr>\n"); } html("</table>"); cgit_print_docend(); } |