summaryrefslogtreecommitdiffabout
path: root/ui-log.c
authorJohan Herland <johan@herland.net>2010-06-09 23:09:35 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-06-19 08:40:24 (UTC)
commit685872b770be2af643d00365d5358e46687f7385 (patch) (side-by-side diff)
tree279a8399c3e9b189a7171df6ca009a58bf1bb8c7 /ui-log.c
parent34c2331d2c33ea28743a2ee3e62f7337ae9887f6 (diff)
downloadcgit-685872b770be2af643d00365d5358e46687f7385.zip
cgit-685872b770be2af643d00365d5358e46687f7385.tar.gz
cgit-685872b770be2af643d00365d5358e46687f7385.tar.bz2
ui-commit: Preserve path limit in links to commit page
This includes adding a path argument to cgit_commit_link() and updating all its callers. The callers from within the commit page (i.e. the "commit", "unidiff"/"side-by-side diff" and "parent" links) all preserve the path limit of the current commit page. All other callers pass NULL (i.e. no path limit). Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-log.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-log.c b/ui-log.c
index 0947604..282eca3 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -57,48 +57,48 @@ void show_commit_decorations(struct commit *commit)
strncpy(buf, deco->name + 10, sizeof(buf) - 1);
cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf);
}
else if (!prefixcmp(deco->name, "refs/remotes/")) {
strncpy(buf, deco->name + 13, sizeof(buf) - 1);
cgit_log_link(buf, NULL, "remote-deco", NULL,
sha1_to_hex(commit->object.sha1), NULL,
0, NULL, NULL, ctx.qry.showmsg);
}
else {
strncpy(buf, deco->name, sizeof(buf) - 1);
cgit_commit_link(buf, NULL, "deco", ctx.qry.head,
- sha1_to_hex(commit->object.sha1), 0);
+ sha1_to_hex(commit->object.sha1), NULL, 0);
}
deco = deco->next;
}
}
void print_commit(struct commit *commit)
{
struct commitinfo *info;
char *tmp;
int cols = 2;
info = cgit_parse_commit(commit);
htmlf("<tr%s><td>",
ctx.qry.showmsg ? " class='logheader'" : "");
tmp = fmt("id=%s", sha1_to_hex(commit->object.sha1));
tmp = cgit_pageurl(ctx.repo->url, "commit", tmp);
html_link_open(tmp, NULL, NULL);
cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE);
html_link_close();
htmlf("</td><td%s>",
ctx.qry.showmsg ? " class='logsubject'" : "");
cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head,
- sha1_to_hex(commit->object.sha1), 0);
+ sha1_to_hex(commit->object.sha1), NULL, 0);
show_commit_decorations(commit);
html("</td><td>");
html_txt(info->author);
if (ctx.repo->enable_log_filecount) {
files = 0;
add_lines = 0;
rem_lines = 0;
cgit_diff_commit(commit, inspect_files);
html("</td><td>");
htmlf("%d", files);
if (ctx.repo->enable_log_linecount) {
html("</td><td>");