]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-commit.c
Fix commitdiff annoyance
[ps-cgit] / ui-commit.c
index c2fafd78f1c60f3c93705ec4ffed96918fdaa5e8..12a96fbc6929a3797c9991b7c1d7dbf29ae99d4f 100644 (file)
@@ -175,6 +175,12 @@ void cgit_print_commit(char *hex)
        html("</td><td class='right'>");
        cgit_print_date(info->committer_date, FMT_LONGDATE);
        html("</td></tr>\n");
+       html("<tr><th>commit</th><td colspan='2' class='sha1'>");
+       tmp = sha1_to_hex(commit->object.sha1);
+       cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp);
+       html(" (");
+       cgit_patch_link("patch", NULL, NULL, NULL, tmp);
+       html(")</td></tr>\n");
        html("<tr><th>tree</th><td colspan='2' class='sha1'>");
        tmp = xstrdup(hex);
        cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL,
@@ -221,10 +227,10 @@ void cgit_print_commit(char *hex)
                html("<div class='diffstat-summary'>");
                htmlf("%d files changed, %d insertions, %d deletions",
                      files, total_adds, total_rems);
+               html("</div>");
                cgit_print_diff(ctx.qry.sha1,
                                sha1_to_hex(commit->parents->item->object.sha1),
                                NULL);
-               html(")</div>");
        }
        cgit_free_commitinfo(info);
 }