From 59125deae6522ca335a16c84a67e57e85edb88d6 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 27 Sep 2026 22:04:58 +0300 Subject: ui-commit: (THEME) Rename and reorder commit element --- ui-commit.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) 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("\n"); - html("\n"); + html("\n"); - html("\n"); - html("\n"); - html("\n"); + if (ctx.repo->snapshots) { + html(""); + } 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(""); continue; } - html("" + html("" ""); parents++; } - if (ctx.repo->snapshots) { - html(""); - } html("
author"); + html("
Commit"); + 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(")
Author"); 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("
committer"); + html("
Committer"); 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("
commit"); - 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(")
tree"); + html("
Files"); 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("
"); + cgit_print_snapshot_links(ctx.repo, hex, "
"); + html("
parent
Parent"); 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(")
download"); - cgit_print_snapshot_links(ctx.repo, hex, "
"); - html("
\n"); html("
"); cgit_open_filter(ctx.repo->commit_filter); -- cgit v1.3.1-23-gd82d