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>
This commit is contained in:
Jakub Narebski
2006-08-24 01:58:49 +02:00
committed by Junio C Hamano
parent eee08903b2
commit af33ef21bf
2 changed files with 5 additions and 1 deletions

View File

@ -285,6 +285,10 @@ div.diff.chunk_header {
color: #990099; color: #990099;
} }
div.diff.incomplete {
color: #cccccc;
}
div.diff_info { div.diff_info {
font-family: monospace; font-family: monospace;
color: #000099; color: #000099;

View File

@ -539,7 +539,7 @@ sub format_diff_line {
$diff_class = " chunk_header"; $diff_class = " chunk_header";
} elsif ($char eq "\\") { } elsif ($char eq "\\") {
# skip errors (incomplete lines) # skip errors (incomplete lines)
return ""; $diff_class = " incomplete";
} }
$line = untabify($line); $line = untabify($line);
return "<div class=\"diff$diff_class\">" . esc_html($line) . "</div>\n"; return "<div class=\"diff$diff_class\">" . esc_html($line) . "</div>\n";