diff options
Diffstat (limited to 'ui-commit.c')
-rw-r--r-- | ui-commit.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui-commit.c b/ui-commit.c index bd55a33..3b0919b 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -75,7 +75,7 @@ void print_fileinfo(struct fileinfo *info) | |||
75 | html("]</span>"); | 75 | html("]</span>"); |
76 | } | 76 | } |
77 | htmlf("</td><td class='%s'>", class); | 77 | htmlf("</td><td class='%s'>", class); |
78 | cgit_diff_link(info->new_path, NULL, NULL, cgit_query_head, curr_rev, | 78 | cgit_diff_link(info->new_path, NULL, NULL, ctx.qry.head, curr_rev, |
79 | NULL, info->new_path); | 79 | NULL, info->new_path); |
80 | if (info->status == DIFF_STATUS_COPIED || info->status == DIFF_STATUS_RENAMED) | 80 | if (info->status == DIFF_STATUS_COPIED || info->status == DIFF_STATUS_RENAMED) |
81 | htmlf(" (%s from %s)", | 81 | htmlf(" (%s from %s)", |
@@ -143,7 +143,7 @@ void cgit_print_commit(char *hex) | |||
143 | int i; | 143 | int i; |
144 | 144 | ||
145 | if (!hex) | 145 | if (!hex) |
146 | hex = cgit_query_head; | 146 | hex = ctx.qry.head; |
147 | curr_rev = hex; | 147 | curr_rev = hex; |
148 | 148 | ||
149 | if (get_sha1(hex, sha1)) { | 149 | if (get_sha1(hex, sha1)) { |
@@ -175,7 +175,7 @@ void cgit_print_commit(char *hex) | |||
175 | html("<tr><th>tree</th><td colspan='2' class='sha1'>"); | 175 | html("<tr><th>tree</th><td colspan='2' class='sha1'>"); |
176 | tmp = xstrdup(hex); | 176 | tmp = xstrdup(hex); |
177 | cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL, | 177 | cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL, |
178 | cgit_query_head, tmp, NULL); | 178 | ctx.qry.head, tmp, NULL); |
179 | html("</td></tr>\n"); | 179 | html("</td></tr>\n"); |
180 | for (p = commit->parents; p ; p = p->next) { | 180 | for (p = commit->parents; p ; p = p->next) { |
181 | parent = lookup_commit_reference(p->item->object.sha1); | 181 | parent = lookup_commit_reference(p->item->object.sha1); |
@@ -188,15 +188,15 @@ void cgit_print_commit(char *hex) | |||
188 | html("<tr><th>parent</th>" | 188 | html("<tr><th>parent</th>" |
189 | "<td colspan='2' class='sha1'>"); | 189 | "<td colspan='2' class='sha1'>"); |
190 | cgit_commit_link(sha1_to_hex(p->item->object.sha1), NULL, NULL, | 190 | cgit_commit_link(sha1_to_hex(p->item->object.sha1), NULL, NULL, |
191 | cgit_query_head, sha1_to_hex(p->item->object.sha1)); | 191 | ctx.qry.head, sha1_to_hex(p->item->object.sha1)); |
192 | html(" ("); | 192 | html(" ("); |
193 | cgit_diff_link("diff", NULL, NULL, cgit_query_head, hex, | 193 | cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex, |
194 | sha1_to_hex(p->item->object.sha1), NULL); | 194 | sha1_to_hex(p->item->object.sha1), NULL); |
195 | html(")</td></tr>"); | 195 | html(")</td></tr>"); |
196 | } | 196 | } |
197 | if (cgit_repo->snapshots) { | 197 | if (cgit_repo->snapshots) { |
198 | html("<tr><th>download</th><td colspan='2' class='sha1'>"); | 198 | html("<tr><th>download</th><td colspan='2' class='sha1'>"); |
199 | cgit_print_snapshot_links(cgit_query_repo, cgit_query_head, | 199 | cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head, |
200 | hex, cgit_repo->snapshots); | 200 | hex, cgit_repo->snapshots); |
201 | html("</td></tr>"); | 201 | html("</td></tr>"); |
202 | } | 202 | } |
@@ -218,7 +218,7 @@ void cgit_print_commit(char *hex) | |||
218 | html("<div class='diffstat-summary'>"); | 218 | html("<div class='diffstat-summary'>"); |
219 | htmlf("%d files changed, %d insertions, %d deletions (", | 219 | htmlf("%d files changed, %d insertions, %d deletions (", |
220 | files, total_adds, total_rems); | 220 | files, total_adds, total_rems); |
221 | cgit_diff_link("show diff", NULL, NULL, cgit_query_head, hex, | 221 | cgit_diff_link("show diff", NULL, NULL, ctx.qry.head, hex, |
222 | NULL, NULL); | 222 | NULL, NULL); |
223 | html(")</div>"); | 223 | html(")</div>"); |
224 | } | 224 | } |