]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Handle other types of tag in git_print_log
authorNamhyung Kim <redacted>
Wed, 4 Jul 2012 02:47:25 +0000 (11:47 +0900)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:32 +0000 (00:51 -0400)
There are many types of tags used in S-o-b area [1].
Update the regex to handle them properly. It requires
the tag should be started by a capital letter and ended
by '-by: ' or '-By: '. The only exception is 'Cc: '.

[1] http://lwn.net/Articles/503829/

Signed-off-by: Namhyung Kim <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 7ce2c8aecb183e35b6a57e14160f334b60b905221db561eff58adfea76b4e1a2..bfa2d79cb1a2a1dd7fdbeb6d4d25e873c9ea9440fe2cf40abcedd123b4b07276 100755 (executable)
@@ -4487,7 +4487,7 @@ sub git_print_log {
        # print log
        my $skip_blank_line = 0;
        foreach my $line (@$log) {
        # print log
        my $skip_blank_line = 0;
        foreach my $line (@$log) {
-               if ($line =~ m/^ *(signed[ \-]off[ \-]by[ :]|acked[ \-]by[ :]|cc[ :])/i) {
+               if ($line =~ m/^\s*([A-Z][-A-Za-z]*-[Bb]y|C[Cc]): /) {
                        if (! $opts{'-remove_signoff'}) {
                                print "<span class=\"signoff\">" . esc_html($line) . "</span><br/>\n";
                                $skip_blank_line = 1;
                        if (! $opts{'-remove_signoff'}) {
                                print "<span class=\"signoff\">" . esc_html($line) . "</span><br/>\n";
                                $skip_blank_line = 1;
This page took 0.269656 seconds and 4 git commands to generate.