{"thread":{"id":"30942","subject":"[PATCH 1/3] gitweb: Get rid of unnecessary check of $signoff","startedAt":"2012-07-03T06:02:54Z","lastAt":"2012-07-04T01:54:36Z","messageCount":10,"participants":["Namhyung Kim","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"194514","messageId":"1341295377-22083-1-git-send-email-namhyung@kernel.org","threadId":"30942","inReplyTo":null,"subject":"[PATCH 0/3] gitweb changes","fromName":"Namhyung Kim","fromEmail":"namhyung@kernel.org","sentAt":"2012-07-03T06:02:54Z","receivedAt":"2012-07-03T06:02:54Z","isPatch":true,"sender":{"key":"namhyung@gmail.com","avatar":"https://avatars.githubusercontent.com/u/48503?v=4"},"body":"Hi,\n\nThis is a small gitweb patchset to address a few issues\nwhen dealt with the tip tree in Linux kernel.\n\nNOTE: I'm not familiar with the code base and even the\nperl language itself. Please kindly let me know if I did\nsomething (horribly) wrong. :)\n\nThanks,\nNamhyung\n\n\nNamhyung Kim (3):\n  gitweb: Get rid of unnecessary check of $signoff\n  gitweb: Handle a few other tags in git_print_log\n  gitweb: Add support to Link: tag\n\n gitweb/gitweb.perl |   21 +++++++++++----------\n 1 file changed, 11 insertions(+), 10 deletions(-)\n\n-- \n1.7.10.2\n"},{"id":"194511","messageId":"1341295377-22083-2-git-send-email-namhyung@kernel.org","threadId":"30942","inReplyTo":"1341295377-22083-1-git-send-email-namhyung@kernel.org","subject":"[PATCH 1/3] gitweb: Get rid of unnecessary check of $signoff","fromName":"Namhyung Kim","fromEmail":"namhyung@kernel.org","sentAt":"2012-07-03T06:02:55Z","receivedAt":"2012-07-03T06:02:55Z","isPatch":true,"sender":{"key":"namhyung@gmail.com","avatar":"https://avatars.githubusercontent.com/u/48503?v=4"},"body":"If $signoff set to 1, the $line would be handled in\nthe if statement for the both cases. So the outer of\nthe conditional always sees the $signoff always set\nto 0 and no need to check it. Thus we can finally get\nrid of it.\n\nSigned-off-by: Namhyung Kim <namhyung@kernel.org>\n---\n gitweb/gitweb.perl |   11 ++---------\n 1 file changed, 2 insertions(+), 9 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 55e0e9e..7585e08 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4484,27 +4484,20 @@ sub git_print_log {\n \t}\n \n \t# print log\n-\tmy $signoff = 0;\n \tmy $empty = 0;\n \tforeach my $line (@$log) {\n \t\tif ($line =~ m/^ *(signed[ \\-]off[ \\-]by[ :]|acked[ \\-]by[ :]|cc[ :])/i) {\n-\t\t\t$signoff = 1;\n \t\t\t$empty = 0;\n \t\t\tif (! $opts{'-remove_signoff'}) {\n \t\t\t\tprint \"<span class=\\\"signoff\\\">\" . esc_html($line) . \"</span><br/>\\n\";\n-\t\t\t\tnext;\n-\t\t\t} else {\n-\t\t\t\t# remove signoff lines\n-\t\t\t\tnext;\n \t\t\t}\n-\t\t} else {\n-\t\t\t$signoff = 0;\n+\t\t\tnext;\n \t\t}\n \n \t\t# print only one empty line\n \t\t# do not print empty line after signoff\n \t\tif ($line eq \"\") {\n-\t\t\tnext if ($empty || $signoff);\n+\t\t\tnext if ($empty);\n \t\t\t$empty = 1;\n \t\t} else {\n \t\t\t$empty = 0;\n-- \n1.7.10.2\n"},{"id":"194513","messageId":"1341295377-22083-3-git-send-email-namhyung@kernel.org","threadId":"30942","inReplyTo":"1341295377-22083-1-git-send-email-namhyung@kernel.org","subject":"[PATCH 2/3] gitweb: Handle a few other tags in git_print_log","fromName":"Namhyung Kim","fromEmail":"namhyung@kernel.org","sentAt":"2012-07-03T06:02:56Z","receivedAt":"2012-07-03T06:02:56Z","isPatch":true,"sender":{"key":"namhyung@gmail.com","avatar":"https://avatars.githubusercontent.com/u/48503?v=4"},"body":"There are many of tags used in s-o-b area. Add\nsupport for a few of well-known ones.\n\nSigned-off-by: Namhyung Kim <namhyung.kim@lge.com>\n---\n gitweb/gitweb.perl |    3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 7585e08..e0701af 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4485,8 +4485,9 @@ sub git_print_log {\n \n \t# print log\n \tmy $empty = 0;\n+\tmy $tags = \"acked|reviewed|reported|tested|suggested\"\n \tforeach my $line (@$log) {\n-\t\tif ($line =~ m/^ *(signed[ \\-]off[ \\-]by[ :]|acked[ \\-]by[ :]|cc[ :])/i) {\n+\t\tif ($line =~ m/^ *(signed[ \\-]off[ \\-]by[ :]|($tags)[ \\-]by[ :]|cc[ :])/i) {\n \t\t\t$empty = 0;\n \t\t\tif (! $opts{'-remove_signoff'}) {\n \t\t\t\tprint \"<span class=\\\"signoff\\\">\" . esc_html($line) . \"</span><br/>\\n\";\n-- \n1.7.10.2\n"},{"id":"194512","messageId":"1341295377-22083-4-git-send-email-namhyung@kernel.org","threadId":"30942","inReplyTo":"1341295377-22083-1-git-send-email-namhyung@kernel.org","subject":"[PATCH 3/3] gitweb: Add support to Link: tag","fromName":"Namhyung Kim","fromEmail":"namhyung@kernel.org","sentAt":"2012-07-03T06:02:57Z","receivedAt":"2012-07-03T06:02:57Z","isPatch":true,"sender":{"key":"namhyung@gmail.com","avatar":"https://avatars.githubusercontent.com/u/48503?v=4"},"body":"The tip tree is the one of major subsystem tree in the\nLinux kernel project. On the tip tree, the Link: tag is\nused for tracking the original discussion or context.\nSince it's ususally in the s-o-b area, it'd be better\nusing same style with others.\n\nAlso as it tends to contain a message-id sent from git\nsend-email, a part of the line which has more than 8\n(hex-)digit characters would set a wrong hyperlink\nlike [1]. Fix it by not using format_log_line_html().\n\n[1] git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=commit;h=08942f6d5d992e9486b07653fd87ea8182a22fa0\n\nSigned-off-by: Namhyung Kim <namhyung@kernel.org>\n---\n gitweb/gitweb.perl |    7 +++++++\n 1 file changed, 7 insertions(+)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex e0701af..d07bcb7 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4493,6 +4493,13 @@ sub git_print_log {\n \t\t\t\tprint \"<span class=\\\"signoff\\\">\" . esc_html($line) . \"</span><br/>\\n\";\n \t\t\t}\n \t\t\tnext;\n+\t\t} elsif ($line =~ m,^ *link[ :](http://[\\w/~.@%&=?+-]*),i) {\n+\t\t\t$empty = 0;\n+\t\t\tif (! $opts{'-remove_signoff'}) {\n+\t\t\t\tprint \"<span class=\\\"signoff\\\">Link: <a href=\\\"\" . esc_html($1) . \"\\\">\" .\n+\t\t\t\t\tesc_html($1) . \"</a></span><br/>\\n\";\n+\t\t\t}\n+\t\t\tnext;\n \t\t}\n \n \t\t# print only one empty line\n-- \n1.7.10.2\n"},{"id":"194551","messageId":"7v7gukvcpd.fsf@alter.siamese.dyndns.org","threadId":"30942","inReplyTo":"1341295377-22083-2-git-send-email-namhyung@kernel.org","subject":"Re: [PATCH 1/3] gitweb: Get rid of unnecessary check of $signoff","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-03T19:58:38Z","receivedAt":"2012-07-03T19:58:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Namhyung Kim <namhyung@kernel.org> writes:\n\n> If $signoff set to 1, the $line would be handled in\n> the if statement for the both cases. So the outer of\n> the conditional always sees the $signoff always set\n> to 0 and no need to check it. Thus we can finally get\n> rid of it.\n\nWhile this may not change the behaviour of the code, I think that\nonly shows the original is broken.  You even have the hint left in\nthe context of your patch:\n\n>  \t\t# print only one empty line\n>  \t\t# do not print empty line after signoff\n>  \t\tif ($line eq \"\") {\n> -\t\t\tnext if ($empty || $signoff);\n> +\t\t\tnext if ($empty);\n\nGiven this input:\n\n\tIf $signoff is set to 1, ...\n        ...\n        rid of it.\n\n\tSigned-off-by: N K\n\n        Signed-off-by: J C H\n\nisn't the code trying (and failing) to remove the empty line between\nthe two S-o-b lines?\n\nSo something like this on top?  I renamed \"$empty\" which is unclear\nwhat it means (\"We just saw an empty line? What does the variable\nwant us to do?\") to \"$skip_blank_line\" which more clearly instructs\nus what to do.  If we see a blank line when it is set, we skip it.\n\n gitweb/gitweb.perl | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 7585e08..202286b 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4484,12 +4484,12 @@ sub git_print_log {\n \t}\n \n \t# print log\n-\tmy $empty = 0;\n+\tmy $skip_blank_line = 0;\n \tforeach my $line (@$log) {\n \t\tif ($line =~ m/^ *(signed[ \\-]off[ \\-]by[ :]|acked[ \\-]by[ :]|cc[ :])/i) {\n-\t\t\t$empty = 0;\n \t\t\tif (! $opts{'-remove_signoff'}) {\n \t\t\t\tprint \"<span class=\\\"signoff\\\">\" . esc_html($line) . \"</span><br/>\\n\";\n+\t\t\t\t$skip_blank_line = 1;\n \t\t\t}\n \t\t\tnext;\n \t\t}\n@@ -4497,10 +4497,10 @@ sub git_print_log {\n \t\t# print only one empty line\n \t\t# do not print empty line after signoff\n \t\tif ($line eq \"\") {\n-\t\t\tnext if ($empty);\n-\t\t\t$empty = 1;\n+\t\t\tnext if ($skip_blank_line);\n+\t\t\t$skip_blank_line = 1;\n \t\t} else {\n-\t\t\t$empty = 0;\n+\t\t\t$skip_blank_line = 0;\n \t\t}\n \n \t\tprint format_log_line_html($line) . \"<br/>\\n\";\n"},{"id":"194552","messageId":"7v3958vcep.fsf@alter.siamese.dyndns.org","threadId":"30942","inReplyTo":"1341295377-22083-3-git-send-email-namhyung@kernel.org","subject":"Re: [PATCH 2/3] gitweb: Handle a few other tags in git_print_log","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-03T20:05:02Z","receivedAt":"2012-07-03T20:05:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Namhyung Kim <namhyung@kernel.org> writes:\n\n> There are many of tags used in s-o-b area. Add\n> support for a few of well-known ones.\n>\n> Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>\n> ---\n>  gitweb/gitweb.perl |    3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index 7585e08..e0701af 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -4485,8 +4485,9 @@ sub git_print_log {\n>  \n>  \t# print log\n>  \tmy $empty = 0;\n> +\tmy $tags = \"acked|reviewed|reported|tested|suggested\"\n\nMissing ';' at the end.\n\n>  \tforeach my $line (@$log) {\n> -\t\tif ($line =~ m/^ *(signed[ \\-]off[ \\-]by[ :]|acked[ \\-]by[ :]|cc[ :])/i) {\n> +\t\tif ($line =~ m/^ *(signed[ \\-]off[ \\-]by[ :]|($tags)[ \\-]by[ :]|cc[ :])/i) {\n\nIs anybody actually helped by these spaces that make the regexp\nunnecessarily cluttered?\n\nI am very tempted to suggest doing something like this:\n\n\tmy $tags = join('|', qw(signed-off acked reviewed reported tested suggested));\n\tfor my $line (@$log) {\n\t\tif ($line =~ m/^\\s*(?:(?:$tags)-by|cc):/i) {\n\t\t\t...\n\nor even this:\n\n\tfor my $line (@$log) {\n\t\tif ($line =~ m/^\\s*(?:[a-z][-a-z]*[a-z]): /i) {\n\t\t\t...\n"},{"id":"194553","messageId":"7vy5n0txdi.fsf@alter.siamese.dyndns.org","threadId":"30942","inReplyTo":"1341295377-22083-4-git-send-email-namhyung@kernel.org","subject":"Re: [PATCH 3/3] gitweb: Add support to Link: tag","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-03T20:15:05Z","receivedAt":"2012-07-03T20:15:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Namhyung Kim <namhyung@kernel.org> writes:\n\n> The tip tree is the one of major subsystem tree in the\n> Linux kernel project. On the tip tree, the Link: tag is\n> used for tracking the original discussion or context.\n> Since it's ususally in the s-o-b area, it'd be better\n> using same style with others.\n>\n> Also as it tends to contain a message-id sent from git\n> send-email, a part of the line which has more than 8\n> (hex-)digit characters would set a wrong hyperlink\n> like [1]. Fix it by not using format_log_line_html().\n>\n> [1] git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=commit;h=08942f6d5d992e9486b07653fd87ea8182a22fa0\n>\n> Signed-off-by: Namhyung Kim <namhyung@kernel.org>\n> ---\n>  gitweb/gitweb.perl |    7 +++++++\n>  1 file changed, 7 insertions(+)\n>\n> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n> index e0701af..d07bcb7 100755\n> --- a/gitweb/gitweb.perl\n> +++ b/gitweb/gitweb.perl\n> @@ -4493,6 +4493,13 @@ sub git_print_log {\n>  \t\t\t\tprint \"<span class=\\\"signoff\\\">\" . esc_html($line) . \"</span><br/>\\n\";\n>  \t\t\t}\n>  \t\t\tnext;\n> +\t\t} elsif ($line =~ m,^ *link[ :](http://[\\w/~.@%&=?+-]*),i) {\n\nHrm, I am somewhat confused.  This catches \"link:http://...\" and\n\"link http://...\", but not \"link: http://...\", which looks a lot\nmore natural looking at least to me.\n\nLooking at a random sample:\n\nhttp://git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=commit;h=fe85227347738eb9b871bc163e7fb0db8b6cd2a0\n\nI see a \"Buglink: \" which I think deserves to be handled by this patch\nbut would not.  Probably the pattern needs to be loosened\nsufficiently, e.g.\n\n\tm,^\\s*[a-z]*link: (https?://\\S+),i\n\nto catch it as well.  Note that I am rejecting space before \":\" and\nrequiring a space after \":\" in the above.\n\nI also notice that \"Reported-bisected-and-tested-by: \" in that\nexample, which is the topic of your [PATCH 2/3].  Perhaps the logic\nshould catch everythinng that match \"^[A-Z][-a-z]*[a-z]: \".\n\nAs to coding style, if you end the body of if () clause with 'next',\nI tend to think it is easier to read if you structure it like this:\n\n\tif (condition 1) {\n        \t... action 1 ...\n                next;\n\t}\n\n        if (condition 2) {\n\t\t... action 2 ...\n\t\tnext;\n\t}\n\ninstead of like this:\n\n\tif (condition 1) {\n        \t... action 1 ...\n                next;\n\t} elsif (condition 2) {\n\t\t... action 2 ...\n\t\tnext;\n\t}\n"},{"id":"194589","messageId":"CAM9d7ciU8j6Kt+9akyPpPiUdCJSFyL1xBbG2_c2epa79FgMmiw@mail.gmail.com","threadId":"30942","inReplyTo":"7vy5n0txdi.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 3/3] gitweb: Add support to Link: tag","fromName":"Namhyung Kim","fromEmail":"namhyung@kernel.org","sentAt":"2012-07-04T01:24:49Z","receivedAt":"2012-07-04T01:24:49Z","isPatch":true,"sender":{"key":"namhyung@gmail.com","avatar":"https://avatars.githubusercontent.com/u/48503?v=4"},"body":"Hi,\n\nOn Wed, Jul 4, 2012 at 5:15 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Namhyung Kim <namhyung@kernel.org> writes:\n>\n>> The tip tree is the one of major subsystem tree in the\n>> Linux kernel project. On the tip tree, the Link: tag is\n>> used for tracking the original discussion or context.\n>> Since it's ususally in the s-o-b area, it'd be better\n>> using same style with others.\n>>\n>> Also as it tends to contain a message-id sent from git\n>> send-email, a part of the line which has more than 8\n>> (hex-)digit characters would set a wrong hyperlink\n>> like [1]. Fix it by not using format_log_line_html().\n>>\n>> [1] git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=commit;h=08942f6d5d992e9486b07653fd87ea8182a22fa0\n>>\n>> Signed-off-by: Namhyung Kim <namhyung@kernel.org>\n>> ---\n>>  gitweb/gitweb.perl |    7 +++++++\n>>  1 file changed, 7 insertions(+)\n>>\n>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n>> index e0701af..d07bcb7 100755\n>> --- a/gitweb/gitweb.perl\n>> +++ b/gitweb/gitweb.perl\n>> @@ -4493,6 +4493,13 @@ sub git_print_log {\n>>                               print \"<span class=\\\"signoff\\\">\" . esc_html($line) . \"</span><br/>\\n\";\n>>                       }\n>>                       next;\n>> +             } elsif ($line =~ m,^ *link[ :](http://[\\w/~.@%&=?+-]*),i) {\n>\n> Hrm, I am somewhat confused.  This catches \"link:http://...\" and\n> \"link http://...\", but not \"link: http://...\", which looks a lot\n> more natural looking at least to me.\n>\n\nOops, right. Actually I found it after some local testing,\nbut forgot to update the patch. Sorry :)\n\n\n> Looking at a random sample:\n>\n> http://git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=commit;h=fe85227347738eb9b871bc163e7fb0db8b6cd2a0\n>\n> I see a \"Buglink: \" which I think deserves to be handled by this patch\n> but would not.  Probably the pattern needs to be loosened\n> sufficiently, e.g.\n>\n>         m,^\\s*[a-z]*link: (https?://\\S+),i\n>\n> to catch it as well.  Note that I am rejecting space before \":\" and\n> requiring a space after \":\" in the above.\n>\n\nI think 'l' in 'link' should be '[Ll]'. Otherwise looks good to me.\n\n\n> I also notice that \"Reported-bisected-and-tested-by: \" in that\n> example, which is the topic of your [PATCH 2/3].  Perhaps the logic\n> should catch everythinng that match \"^[A-Z][-a-z]*[a-z]: \".\n>\n\nIsn't \"^[A-Z][-A-Za-z]*-[Bb]y: \" enough?\nJust FYI, please see this too:\n\nhttp://lwn.net/Articles/503829/\n\n\n> As to coding style, if you end the body of if () clause with 'next',\n> I tend to think it is easier to read if you structure it like this:\n>\n>         if (condition 1) {\n>                 ... action 1 ...\n>                 next;\n>         }\n>\n>         if (condition 2) {\n>                 ... action 2 ...\n>                 next;\n>         }\n>\n> instead of like this:\n>\n>         if (condition 1) {\n>                 ... action 1 ...\n>                 next;\n>         } elsif (condition 2) {\n>                 ... action 2 ...\n>                 next;\n>         }\n>\n\nOk, I'll send v2 soon after addressing all of your comments\n(including previous mails).\n\nThanks,\nNamhyung\n"},{"id":"194590","messageId":"CAM9d7cgO1u86o0Wk+XUOE=vkDkb=T5UTSX4Tz5pgMYE+ztaubA@mail.gmail.com","threadId":"30942","inReplyTo":"CAM9d7ciU8j6Kt+9akyPpPiUdCJSFyL1xBbG2_c2epa79FgMmiw@mail.gmail.com","subject":"Re: [PATCH 3/3] gitweb: Add support to Link: tag","fromName":"Namhyung Kim","fromEmail":"namhyung@kernel.org","sentAt":"2012-07-04T01:30:11Z","receivedAt":"2012-07-04T01:30:11Z","isPatch":true,"sender":{"key":"namhyung@gmail.com","avatar":"https://avatars.githubusercontent.com/u/48503?v=4"},"body":"On Wed, Jul 4, 2012 at 10:24 AM, Namhyung Kim <namhyung@kernel.org> wrote:\n> On Wed, Jul 4, 2012 at 5:15 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Namhyung Kim <namhyung@kernel.org> writes:\n>> I also notice that \"Reported-bisected-and-tested-by: \" in that\n>> example, which is the topic of your [PATCH 2/3].  Perhaps the logic\n>> should catch everythinng that match \"^[A-Z][-a-z]*[a-z]: \".\n>>\n>\n> Isn't \"^[A-Z][-A-Za-z]*-[Bb]y: \" enough?\n\nOh, I guess you considered \"Cc: \" also.\nThat could be handled specially, though.\n\nThanks,\nNamhyung\n"},{"id":"194591","messageId":"CAM9d7chjjRUyM=AunVV3=XT+v86diHGboi4KO_XWCK3_i_yqLw@mail.gmail.com","threadId":"30942","inReplyTo":"CAM9d7ciU8j6Kt+9akyPpPiUdCJSFyL1xBbG2_c2epa79FgMmiw@mail.gmail.com","subject":"Re: [PATCH 3/3] gitweb: Add support to Link: tag","fromName":"Namhyung Kim","fromEmail":"namhyung@kernel.org","sentAt":"2012-07-04T01:54:36Z","receivedAt":"2012-07-04T01:54:36Z","isPatch":true,"sender":{"key":"namhyung@gmail.com","avatar":"https://avatars.githubusercontent.com/u/48503?v=4"},"body":"On Wed, Jul 4, 2012 at 10:24 AM, Namhyung Kim <namhyung@kernel.org> wrote:\n> Hi,\n>\n> On Wed, Jul 4, 2012 at 5:15 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Namhyung Kim <namhyung@kernel.org> writes:\n>>\n>>> The tip tree is the one of major subsystem tree in the\n>>> Linux kernel project. On the tip tree, the Link: tag is\n>>> used for tracking the original discussion or context.\n>>> Since it's ususally in the s-o-b area, it'd be better\n>>> using same style with others.\n>>>\n>>> Also as it tends to contain a message-id sent from git\n>>> send-email, a part of the line which has more than 8\n>>> (hex-)digit characters would set a wrong hyperlink\n>>> like [1]. Fix it by not using format_log_line_html().\n>>>\n>>> [1] git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=commit;h=08942f6d5d992e9486b07653fd87ea8182a22fa0\n>>>\n>>> Signed-off-by: Namhyung Kim <namhyung@kernel.org>\n>>> ---\n>>>  gitweb/gitweb.perl |    7 +++++++\n>>>  1 file changed, 7 insertions(+)\n>>>\n>>> diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\n>>> index e0701af..d07bcb7 100755\n>>> --- a/gitweb/gitweb.perl\n>>> +++ b/gitweb/gitweb.perl\n>>> @@ -4493,6 +4493,13 @@ sub git_print_log {\n>>>                               print \"<span class=\\\"signoff\\\">\" . esc_html($line) . \"</span><br/>\\n\";\n>>>                       }\n>>>                       next;\n>>> +             } elsif ($line =~ m,^ *link[ :](http://[\\w/~.@%&=?+-]*),i) {\n>>\n>> Hrm, I am somewhat confused.  This catches \"link:http://...\" and\n>> \"link http://...\", but not \"link: http://...\", which looks a lot\n>> more natural looking at least to me.\n>>\n>\n> Oops, right. Actually I found it after some local testing,\n> but forgot to update the patch. Sorry :)\n>\n>\n>> Looking at a random sample:\n>>\n>> http://git.kernel.org/?p=linux/kernel/git/tip/tip.git;a=commit;h=fe85227347738eb9b871bc163e7fb0db8b6cd2a0\n>>\n>> I see a \"Buglink: \" which I think deserves to be handled by this patch\n>> but would not.  Probably the pattern needs to be loosened\n>> sufficiently, e.g.\n>>\n>>         m,^\\s*[a-z]*link: (https?://\\S+),i\n>>\n>> to catch it as well.  Note that I am rejecting space before \":\" and\n>> requiring a space after \":\" in the above.\n>>\n>\n> I think 'l' in 'link' should be '[Ll]'. Otherwise looks good to me.\n>\n\nOops (again), I missed 'i' at the end.\n\nThanks,\nNamhyung\n"}]}