]> asedeno.scripts.mit.edu Git - git.git/commitdiff
gitweb: Show information about incomplete lines in commitdiff
authorJakub Narebski <jnareb@gmail.com>
Wed, 23 Aug 2006 23:58:49 +0000 (01:58 +0200)
committerJunio C Hamano <junkio@cox.net>
Sat, 26 Aug 2006 02:29:36 +0000 (19:29 -0700)
In format_diff_line, instead of skipping errors/incomplete lines,
for example
  "\ No newline at end of file"
in HTML pretty-printing of diff, use "incomplete" class for div.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.css
gitweb/gitweb.perl

index 4821022535513dafd49b4b978f18baabbeb15f42..5eaa24fd24945bcec7d7fc4230755a85238f82e4 100644 (file)
@@ -285,6 +285,10 @@ div.diff.chunk_header {
        color: #990099;
 }
 
+div.diff.incomplete {
+       color: #cccccc;
+}
+
 div.diff_info {
        font-family: monospace;
        color: #000099;
index 93676857344858ba84c1cbb82351d6c2ecf8a105..fe9b9ee87a94913955dbb18ef5fba007c25dbcfa 100755 (executable)
@@ -539,7 +539,7 @@ sub format_diff_line {
                $diff_class = " chunk_header";
        } elsif ($char eq "\\") {
                # skip errors (incomplete lines)
-               return "";
+               $diff_class = " incomplete";
        }
        $line = untabify($line);
        return "<div class=\"diff$diff_class\">" . esc_html($line) . "</div>\n";