summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.css6
-rw-r--r--ui-commit.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/cgit.css b/cgit.css
index 87fd00a..5cf8d15 100644
--- a/cgit.css
+++ b/cgit.css
@@ -238,5 +238,9 @@ div.commit-msg {
238 238
239div.diffstat-header {
240 font-weight: bold;
241 padding-top: 1.5em;
242}
243
239table.diffstat { 244table.diffstat {
240 border-collapse: collapse; 245 border-collapse: collapse;
241 margin-top: 1.5em;
242 width: 100%; 246 width: 100%;
diff --git a/ui-commit.c b/ui-commit.c
index 93eb8fd..ff1fad3 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -223,2 +223,3 @@ void cgit_print_commit(const char *hex)
223 if (!(commit->parents && commit->parents->next && commit->parents->next->next)) { 223 if (!(commit->parents && commit->parents->next && commit->parents->next->next)) {
224 html("<div class='diffstat-header'>Diffstat</div>");
224 html("<table class='diffstat'>"); 225 html("<table class='diffstat'>");
@@ -230,4 +231,7 @@ void cgit_print_commit(const char *hex)
230 html("<div class='diffstat-summary'>"); 231 html("<div class='diffstat-summary'>");
231 htmlf("%d files changed, %d insertions, %d deletions\n", 232 htmlf("%d files changed, %d insertions, %d deletions (",
232 files, total_adds, total_rems); 233 files, total_adds, total_rems);
234 query = fmt("h=%s", hex);
235 html_link_open(cgit_pageurl(cgit_query_repo, "diff", query), NULL, NULL);
236 html("show diff</a>)");
233 html("</div>"); 237 html("</div>");