1
0
mirror of https://github.com/git/git.git synced 2025-03-25 05:30:29 +00:00

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

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

@ -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";