diff options
1 files changed, 15 insertions, 15 deletions
| -rw-r--r-- | ui-commit.c | 30 |
diff --git a/ui-commit.c b/ui-commit.c index 972e9bc..1739dd6 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -49,7 +49,13 @@ void cgit_print_commit(char *hex, const char *prefix) cgit_print_layout_start(); cgit_print_diff_ctrls(); html("<table summary='commit info' class='commit-info'>\n"); - html("<tr><th>author</th><td>"); + html("<tr><th>Commit</th><td colspan='2' class='oid'>"); + tmp = oid_to_hex(&commit->object.oid); + cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix); + html(" ("); + cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix); + html(")</td></tr>\n"); + html("<tr><th>Author</th><td>"); cgit_open_filter(ctx.repo->email_filter, info->author_email, "commit"); html_txt(info->author); if (!ctx.cfg.noplainemail) { @@ -61,7 +67,7 @@ void cgit_print_commit(char *hex, const char *prefix) html_txt(show_date(info->author_date, info->author_tz, cgit_date_mode(DATE_ISO8601))); html("</td></tr>\n"); - html("<tr><th>committer</th><td>"); + html("<tr><th>Committer</th><td>"); cgit_open_filter(ctx.repo->email_filter, info->committer_email, "commit"); html_txt(info->committer); if (!ctx.cfg.noplainemail) { @@ -73,13 +79,7 @@ void cgit_print_commit(char *hex, const char *prefix) html_txt(show_date(info->committer_date, info->committer_tz, cgit_date_mode(DATE_ISO8601))); html("</td></tr>\n"); - html("<tr><th>commit</th><td colspan='2' class='oid'>"); - tmp = oid_to_hex(&commit->object.oid); - cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix); - html(" ("); - cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix); - html(")</td></tr>\n"); - html("<tr><th>tree</th><td colspan='2' class='oid'>"); + html("<tr><th>Files</th><td colspan='2' class='oid'>"); tmp = xstrdup(hex); cgit_tree_link(oid_to_hex(get_commit_tree_oid(commit)), NULL, NULL, ctx.qry.head, tmp, NULL); @@ -89,6 +89,11 @@ void cgit_print_commit(char *hex, const char *prefix) } free(tmp); html("</td></tr>\n"); + if (ctx.repo->snapshots) { + html("<tr><th></th><td colspan='2' class='oid'>"); + cgit_print_snapshot_links(ctx.repo, hex, "<br/>"); + html("</td></tr>"); + } for (p = commit->parents; p; p = p->next) { parent = lookup_commit_reference(the_repository, &p->item->object.oid); if (!parent) { @@ -97,7 +102,7 @@ void cgit_print_commit(char *hex, const char *prefix) html("</td></tr>"); continue; } - html("<tr><th>parent</th>" + html("<tr><th>Parent</th>" "<td colspan='2' class='oid'>"); tmp = tmp2 = oid_to_hex(&p->item->object.oid); if (ctx.repo->enable_subject_links) { @@ -111,11 +116,6 @@ void cgit_print_commit(char *hex, const char *prefix) html(")</td></tr>"); parents++; } - if (ctx.repo->snapshots) { - html("<tr><th>download</th><td colspan='2' class='oid'>"); - cgit_print_snapshot_links(ctx.repo, hex, "<br/>"); - html("</td></tr>"); - } html("</table>\n"); html("<div class='commit-subject'>"); cgit_open_filter(ctx.repo->commit_filter); |
