]> granicus.if.org Git - cgit/commitdiff
ui-log: color line changes
authorChristian Hesse <mail@eworm.de>
Wed, 29 Jun 2016 07:37:57 +0000 (09:37 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 5 Jul 2016 14:14:47 +0000 (16:14 +0200)
Signed-off-by: Christian Hesse <mail@eworm.de>
cgit.css
ui-log.c

index 66c6d533206a674d2f0e6b3d19044f3297018e1e..983eac5cd5f456bcf1197ebfbbc5b9f0c94e8c58 100644 (file)
--- a/cgit.css
+++ b/cgit.css
@@ -590,6 +590,15 @@ div#cgit span.age-months {
 div#cgit span.age-years {
        color: #bbb;
 }
+
+div#cgit span.insertions {
+       color: #080;
+}
+
+div#cgit span.deletions {
+       color: #800;
+}
+
 div#cgit div.footer {
        margin-top: 0.5em;
        text-align: center;
index d6d94f658391e57cdc11da36c7a0f7902d8716e1..c97b8e05e535740e3f73cb60dd515544d9dcce06 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -258,7 +258,8 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
        if (ctx.repo->enable_log_filecount)
                htmlf("</td><td>%d", files);
        if (ctx.repo->enable_log_linecount)
-               htmlf("</td><td>-%d/+%d", rem_lines, add_lines);
+               htmlf("</td><td><span class='deletions'>-%d</span>/"
+                       "<span class='insertions'>+%d</span>", rem_lines, add_lines);
 
        html("</td></tr>\n");