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:
parent
eee08903b2
commit
af33ef21bf
gitweb
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user