X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/f97c707a3b975d32910331f72783ec3044e3c0ee..d1f3bbe9d22029f45a77bb938c176ccc0c827d46:/ui-commit.c
diff --git a/ui-commit.c b/ui-commit.c
index bf5e6dc..25721ca 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -75,8 +75,8 @@ void print_fileinfo(struct fileinfo *info)
html("]");
}
htmlf("
", class);
- cgit_tree_link(info->new_path, NULL, NULL, cgit_query_head, curr_rev,
- info->new_path);
+ cgit_diff_link(info->new_path, NULL, NULL, ctx.qry.head, curr_rev,
+ NULL, info->new_path);
if (info->status == DIFF_STATUS_COPIED || info->status == DIFF_STATUS_RENAMED)
htmlf(" (%s from %s)",
info->status == DIFF_STATUS_COPIED ? "copied" : "renamed",
@@ -84,7 +84,7 @@ void print_fileinfo(struct fileinfo *info)
html(" | ");
htmlf("%d", info->added + info->removed);
html(" | ");
- htmlf("", (max_changes > 100 ? 100 : max_changes));
+ htmlf("", (max_changes > 100 ? 100 : max_changes));
htmlf(" | ",
info->added * 100.0 / max_changes);
htmlf(" | ",
@@ -143,7 +143,7 @@ void cgit_print_commit(char *hex)
int i;
if (!hex)
- hex = cgit_query_head;
+ hex = ctx.qry.head;
curr_rev = hex;
if (get_sha1(hex, sha1)) {
@@ -157,7 +157,7 @@ void cgit_print_commit(char *hex)
}
info = cgit_parse_commit(commit);
- html("\n");
+ html("\n");
html("| author | ");
html_txt(info->author);
html(" ");
@@ -175,7 +175,7 @@ void cgit_print_commit(char *hex)
html(" |
|---|
| tree | ");
tmp = xstrdup(hex);
cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL,
- cgit_query_head, tmp, NULL);
+ ctx.qry.head, tmp, NULL);
html(" | \n");
for (p = commit->parents; p ; p = p->next) {
parent = lookup_commit_reference(p->item->object.sha1);
@@ -188,15 +188,16 @@ void cgit_print_commit(char *hex)
html("| parent | "
"");
cgit_commit_link(sha1_to_hex(p->item->object.sha1), NULL, NULL,
- cgit_query_head, sha1_to_hex(p->item->object.sha1));
+ ctx.qry.head, sha1_to_hex(p->item->object.sha1));
html(" (");
- cgit_diff_link("diff", NULL, NULL, cgit_query_head, hex,
+ cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex,
sha1_to_hex(p->item->object.sha1), NULL);
html(") | ");
}
- if (cgit_repo->snapshots) {
+ if (ctx.repo->snapshots) {
html("| download | ");
- cgit_print_snapshot_links(cgit_query_repo,hex);
+ cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,
+ hex, ctx.repo->snapshots);
html(" | ");
}
html(" \n");
@@ -208,7 +209,7 @@ void cgit_print_commit(char *hex)
html("");
if (!(commit->parents && commit->parents->next && commit->parents->next->next)) {
html("");
- html("");
+ html("");
max_changes = 0;
cgit_diff_commit(commit, inspect_filepair);
for(i = 0; i");
htmlf("%d files changed, %d insertions, %d deletions (",
files, total_adds, total_rems);
- cgit_diff_link("show diff", NULL, NULL, cgit_query_head, hex,
+ cgit_diff_link("show diff", NULL, NULL, ctx.qry.head, hex,
NULL, NULL);
html(")");
}
|