diff options
Diffstat (limited to 'ui-commit.c')
| -rw-r--r-- | ui-commit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ui-commit.c b/ui-commit.c index 2bca7a0..0c3d740 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
| @@ -69,14 +69,14 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
| 69 | cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time); | 69 | cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time); |
| 70 | html("</td></tr>\n"); | 70 | html("</td></tr>\n"); |
| 71 | html("<tr><th>commit</th><td colspan='2' class='sha1'>"); | 71 | html("<tr><th>commit</th><td colspan='2' class='sha1'>"); |
| 72 | tmp = sha1_to_hex(commit->object.sha1); | 72 | tmp = oid_to_hex(&commit->object.oid); |
| 73 | cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix); | 73 | cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix); |
| 74 | html(" ("); | 74 | html(" ("); |
| 75 | cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix); | 75 | cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix); |
| 76 | html(")</td></tr>\n"); | 76 | html(")</td></tr>\n"); |
| 77 | html("<tr><th>tree</th><td colspan='2' class='sha1'>"); | 77 | html("<tr><th>tree</th><td colspan='2' class='sha1'>"); |
| 78 | tmp = xstrdup(hex); | 78 | tmp = xstrdup(hex); |
| 79 | cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL, | 79 | cgit_tree_link(oid_to_hex(&commit->tree->object.oid), NULL, NULL, |
| 80 | ctx.qry.head, tmp, NULL); | 80 | ctx.qry.head, tmp, NULL); |
| 81 | if (prefix) { | 81 | if (prefix) { |
| 82 | html(" /"); | 82 | html(" /"); |
| @@ -85,7 +85,7 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
| 85 | free(tmp); | 85 | free(tmp); |
| 86 | html("</td></tr>\n"); | 86 | html("</td></tr>\n"); |
| 87 | for (p = commit->parents; p; p = p->next) { | 87 | for (p = commit->parents; p; p = p->next) { |
| 88 | parent = lookup_commit_reference(p->item->object.sha1); | 88 | parent = lookup_commit_reference(p->item->object.oid.hash); |
| 89 | if (!parent) { | 89 | if (!parent) { |
| 90 | html("<tr><td colspan='3'>"); | 90 | html("<tr><td colspan='3'>"); |
| 91 | cgit_print_error("Error reading parent commit"); | 91 | cgit_print_error("Error reading parent commit"); |
| @@ -94,7 +94,7 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
| 94 | } | 94 | } |
| 95 | html("<tr><th>parent</th>" | 95 | html("<tr><th>parent</th>" |
| 96 | "<td colspan='2' class='sha1'>"); | 96 | "<td colspan='2' class='sha1'>"); |
| 97 | tmp = tmp2 = sha1_to_hex(p->item->object.sha1); | 97 | tmp = tmp2 = oid_to_hex(&p->item->object.oid); |
| 98 | if (ctx.repo->enable_subject_links) { | 98 | if (ctx.repo->enable_subject_links) { |
| 99 | parent_info = cgit_parse_commit(parent); | 99 | parent_info = cgit_parse_commit(parent); |
| 100 | tmp2 = parent_info->subject; | 100 | tmp2 = parent_info->subject; |
| @@ -102,7 +102,7 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
| 102 | cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix); | 102 | cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix); |
| 103 | html(" ("); | 103 | html(" ("); |
| 104 | cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex, | 104 | cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex, |
| 105 | sha1_to_hex(p->item->object.sha1), prefix); | 105 | oid_to_hex(&p->item->object.oid), prefix); |
| 106 | html(")</td></tr>"); | 106 | html(")</td></tr>"); |
| 107 | parents++; | 107 | parents++; |
| 108 | } | 108 | } |
| @@ -135,7 +135,7 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
| 135 | } | 135 | } |
| 136 | if (parents < 3) { | 136 | if (parents < 3) { |
| 137 | if (parents) | 137 | if (parents) |
| 138 | tmp = sha1_to_hex(commit->parents->item->object.sha1); | 138 | tmp = oid_to_hex(&commit->parents->item->object.oid); |
| 139 | else | 139 | else |
| 140 | tmp = NULL; | 140 | tmp = NULL; |
| 141 | cgit_print_diff(ctx.qry.sha1, tmp, prefix, 0, 0); | 141 | cgit_print_diff(ctx.qry.sha1, tmp, prefix, 0, 0); |
