]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: Cleanup git_print_log()
[Gitweb] / gitweb.perl
index 2458fa849b3499e34dbfe7dde2d78340b185db3610502f02789509fd2fa1e789..7ce2c8aecb183e35b6a57e14160f334b60b905221db561eff58adfea76b4e1a2 100755 (executable)
@@ -4485,30 +4485,23 @@ sub git_print_log {
        }
 
        # print log
        }
 
        # print log
-       my $signoff = 0;
-       my $empty = 0;
+       my $skip_blank_line = 0;
        foreach my $line (@$log) {
                if ($line =~ m/^ *(signed[ \-]off[ \-]by[ :]|acked[ \-]by[ :]|cc[ :])/i) {
        foreach my $line (@$log) {
                if ($line =~ m/^ *(signed[ \-]off[ \-]by[ :]|acked[ \-]by[ :]|cc[ :])/i) {
-                       $signoff = 1;
-                       $empty = 0;
                        if (! $opts{'-remove_signoff'}) {
                                print "<span class=\"signoff\">" . esc_html($line) . "</span><br/>\n";
                        if (! $opts{'-remove_signoff'}) {
                                print "<span class=\"signoff\">" . esc_html($line) . "</span><br/>\n";
-                               next;
-                       } else {
-                               # remove signoff lines
-                               next;
+                               $skip_blank_line = 1;
                        }
                        }
-               } else {
-                       $signoff = 0;
+                       next;
                }
 
                # print only one empty line
                # do not print empty line after signoff
                if ($line eq "") {
                }
 
                # print only one empty line
                # do not print empty line after signoff
                if ($line eq "") {
-                       next if ($empty || $signoff);
-                       $empty = 1;
+                       next if ($skip_blank_line);
+                       $skip_blank_line = 1;
                } else {
                } else {
-                       $empty = 0;
+                       $skip_blank_line = 0;
                }
 
                print format_log_line_html($line) . "<br/>\n";
                }
 
                print format_log_line_html($line) . "<br/>\n";
@@ -4516,7 +4509,7 @@ sub git_print_log {
 
        if ($opts{'-final_empty_line'}) {
                # end with single empty line
 
        if ($opts{'-final_empty_line'}) {
                # end with single empty line
-               print "<br/>\n" unless $empty;
+               print "<br/>\n" unless $skip_blank_line;
        }
 }
 
        }
 }
 
This page took 0.257488 seconds and 4 git commands to generate.