diff options
author | Jakub Narebski <jnareb@gmail.com> | 2006-08-24 01:58:49 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-25 19:29:36 -0700 |
commit | af33ef21bfb0171973393e21deac7621efd2ec7a (patch) | |
tree | d8c886f4a0a4aff238517e49a327175dd34ea8d4 | |
parent | eee08903b2cb9cfaf9ee2cd69a255ace829ae7c5 (diff) | |
download | git-af33ef21bfb0171973393e21deac7621efd2ec7a.tar.gz |
gitweb: Show information about incomplete lines in commitdiff
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>
-rw-r--r-- | gitweb/gitweb.css | 4 | ||||
-rwxr-xr-x | gitweb/gitweb.perl | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css index 4821022535..5eaa24fd24 100644 --- a/gitweb/gitweb.css +++ b/gitweb/gitweb.css @@ -285,6 +285,10 @@ div.diff.chunk_header { color: #990099; } +div.diff.incomplete { + color: #cccccc; +} + div.diff_info { font-family: monospace; color: #000099; diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 9367685734..fe9b9ee87a 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -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"; |