-rw-r--r-- | ui-commit.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/ui-commit.c b/ui-commit.c index bd55a33..8019e36 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -9,2 +9,4 @@ #include "cgit.h" +#include "html.h" +#include "ui-shared.h" @@ -64,5 +66,5 @@ void print_fileinfo(struct fileinfo *info) if (is_null_sha1(info->new_sha1)) { - html_filemode(info->old_mode); + cgit_print_filemode(info->old_mode); } else { - html_filemode(info->new_mode); + cgit_print_filemode(info->new_mode); } @@ -73,3 +75,3 @@ void print_fileinfo(struct fileinfo *info) html("<span class='modechange'>["); - html_filemode(info->old_mode); + cgit_print_filemode(info->old_mode); html("]</span>"); @@ -77,3 +79,3 @@ void print_fileinfo(struct fileinfo *info) htmlf("</td><td class='%s'>", class); - cgit_diff_link(info->new_path, NULL, NULL, cgit_query_head, curr_rev, + cgit_diff_link(info->new_path, NULL, NULL, ctx.qry.head, curr_rev, NULL, info->new_path); @@ -145,3 +147,3 @@ void cgit_print_commit(char *hex) if (!hex) - hex = cgit_query_head; + hex = ctx.qry.head; curr_rev = hex; @@ -177,3 +179,3 @@ void cgit_print_commit(char *hex) cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL, - cgit_query_head, tmp, NULL); + ctx.qry.head, tmp, NULL); html("</td></tr>\n"); @@ -190,5 +192,5 @@ void cgit_print_commit(char *hex) 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); @@ -196,6 +198,6 @@ void cgit_print_commit(char *hex) } - if (cgit_repo->snapshots) { + if (ctx.repo->snapshots) { html("<tr><th>download</th><td colspan='2' class='sha1'>"); - cgit_print_snapshot_links(cgit_query_repo, cgit_query_head, - hex, cgit_repo->snapshots); + cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head, + hex, ctx.repo->snapshots); html("</td></tr>"); @@ -220,3 +222,3 @@ void cgit_print_commit(char *hex) 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); |