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>
Jakub Narebski committed
Aug 24, 2006 at 01:58 UTC
af33ef21bfb0171973393e21deac7621efd2ec7a
2 files changed
+5
-1
gitweb/gitweb.css
+4
@@ -285,6 +285,10 @@ div.diff.chunk_header {
285
color: #990099;
286
}
287
288
+div.diff.incomplete {
289
+ color: #cccccc;
290
+}
291
+
292
div.diff_info {
293
font-family: monospace;
294
color: #000099;
gitweb/gitweb.perl
+1
-1
@@ -539,7 +539,7 @@ sub format_diff_line {
539
$diff_class = " chunk_header";
540
} elsif ($char eq "\\") {
541
# skip errors (incomplete lines)
542
- return "";
542
+ $diff_class = " incomplete";
543
}
544
$line = untabify($line);
545
return "<div class=\"diff$diff_class\">" . esc_html($line) . "</div>\n";