1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-20 07:19:30 +02:00

gitweb: Handle other types of tag in git_print_log

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 <namhyung@kernel.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Namhyung Kim 2012-07-04 11:47:25 +09:00 committed by Junio C Hamano
parent 5a45c0cafe
commit 3d1110aa72

View File

@ -4462,7 +4462,7 @@ sub git_print_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;