X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/f90195d01fe8acdcefc7113133e0db812dafefaa07c722d3072882479df43093..6d265b373bd7b368a71f314a64b39c0ee8e056f424d02094747a96fdcb6a242f:/gitweb.perl?ds=inline diff --git a/gitweb.perl b/gitweb.perl index 2458fa8..7ce2c8a 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -4485,30 +4485,23 @@ sub git_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) { - $signoff = 1; - $empty = 0; if (! $opts{'-remove_signoff'}) { print "" . esc_html($line) . "
\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 "") { - next if ($empty || $signoff); - $empty = 1; + next if ($skip_blank_line); + $skip_blank_line = 1; } else { - $empty = 0; + $skip_blank_line = 0; } print format_log_line_html($line) . "
\n"; @@ -4516,7 +4509,7 @@ sub git_print_log { if ($opts{'-final_empty_line'}) { # end with single empty line - print "
\n" unless $empty; + print "
\n" unless $skip_blank_line; } }