gitweb: Recognize *-to and Closes/Fixes trailers
authorEmma Brooks <redacted>
Sat, 25 Apr 2020 02:17:23 +0000 (02:17 +0000)
committerJunio C Hamano <redacted>
Sat, 25 Apr 2020 05:19:04 +0000 (22:19 -0700)
Commit trailers like "Thanks-to:", "Fixes:", and "Closes:" are fairly
common, but gitweb didn't highlight them like other trailers.

Signed-off-by: Emma Brooks <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb/gitweb.perl

index 65a3a9e62e809b1a74722536e7b2adc8389c595e..e585b70b6ce5aa82ed65822799dbeb165ac638e0 100755 (executable)
@@ -4627,7 +4627,7 @@ sub git_print_log {
        # print log
        my $skip_blank_line = 0;
        foreach my $line (@$log) {
-               if ($line =~ m/^\s*([A-Z][-A-Za-z]*-[Bb]y|C[Cc]): /) {
+               if ($line =~ m/^\s*([A-Z][-A-Za-z]*-([Bb]y|[Tt]o)|C[Cc]|(Clos|Fix)es): /) {
                        if (! $opts{'-remove_signoff'}) {
                                print "<span class=\"signoff\">" . esc_html($line) . "</span><br/>\n";
                                $skip_blank_line = 1;
git clone https://git.99rst.org/PROJECT