]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Show information about incomplete lines in commitdiff
authorJakub Narebski <redacted>
Wed, 23 Aug 2006 23:58:49 +0000 (01:58 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:10 +0000 (00:07 -0400)
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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.css
gitweb.perl

index 2ae22e62dd3c97ab6cfdafd7c4b943e94ac4036d974148fc27fb070d55f4cdad..a592d3cc2c64d20f9029e9ee94b657631c93c09c9cde290813725dccb9c844d9 100644 (file)
@@ -285,6 +285,10 @@ div.diff.chunk_header {
        color: #990099;
 }
 
+div.diff.incomplete {
+       color: #cccccc;
+}
+
 div.diff_info {
        font-family: monospace;
        color: #000099;
index 2b3ab3eda5df9cf04383e49dbca294c76f475f281cd9506c241a46906157b9ae..b27740937b3788eb8fca9c97237e041e0dd7396e5d52962543874fd588bce784 100755 (executable)
@@ -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";
This page took 0.292799 seconds and 4 git commands to generate.