From: Eivind Uggedal Date: Wed, 9 Dec 2015 09:43:20 +0000 (+0000) Subject: Simplify diff markup X-Git-Url: https://git.armaanb.net/?a=commitdiff_plain;h=b634cfd86042f303dae68c2805810c7a0f9614c5;p=stagit.git Simplify diff markup Remove for inserted/deleted lines and use the for coloring. --- diff --git a/style.css b/style.css index d7de757..2823efb 100644 --- a/style.css +++ b/style.css @@ -50,18 +50,14 @@ pre .h { color: darkcyan; } -pre .i { +pre a.i { color: green; } -pre .d { +pre a.d { color: red; } -pre span a { - color: inherit; -} - -pre span a:hover { +pre a.i:hover, pre a.d:hover { text-decoration: none; } diff --git a/urmoms.c b/urmoms.c index 01aebb1..8167d0f 100644 --- a/urmoms.c +++ b/urmoms.c @@ -333,16 +333,16 @@ printshowfile(struct commitinfo *ci) if (git_patch_get_line_in_hunk(&line, patch, j, k)) break; if (line->old_lineno == -1) - fprintf(fp, "+", + fprintf(fp, "+", j, k, j, k); else if (line->new_lineno == -1) - fprintf(fp, "-", + fprintf(fp, "-", j, k, j, k); else fputc(' ', fp); xmlencode(fp, line->content, line->content_len); if (line->old_lineno == -1 || line->new_lineno == -1) - fputs("", fp); + fputs("", fp); } } git_patch_free(patch);