From: Jakub Narebski Date: Wed, 23 Aug 2006 23:58:49 +0000 (+0200) Subject: gitweb: Show information about incomplete lines in commitdiff X-Git-Tag: v1.4.3-rc1~168^2~25 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af33ef21bfb0171973393e21deac7621efd2ec7a;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.css b/gitweb/gitweb.css index 482102253..5eaa24fd2 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 936768573..fe9b9ee87 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 "
" . esc_html($line) . "
\n";