{"thread":{"id":"53316","subject":"[PATCH] gitweb: Recognize *-to and Closes/Fixes trailers","startedAt":"2020-04-25T02:18:01Z","lastAt":"2020-04-25T06:30:25Z","messageCount":3,"participants":["Emma Brooks","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"396212","messageId":"20200425021723.16346-1-me@pluvano.com","threadId":"53316","inReplyTo":null,"subject":"[PATCH] gitweb: Recognize *-to and Closes/Fixes trailers","fromName":"Emma Brooks","fromEmail":"me@pluvano.com","sentAt":"2020-04-25T02:17:23Z","receivedAt":"2020-04-25T02:18:01Z","isPatch":true,"sender":{"key":"me@pluvano.com","avatar":"https://avatars.githubusercontent.com/u/50312486?v=4"},"body":"Commit trailers like \"Thanks-to:\", \"Fixes:\", and \"Closes:\" are fairly\ncommon, but gitweb didn't highlight them like other trailers.\n\nSigned-off-by: Emma Brooks <me@pluvano.com>\n---\n gitweb/gitweb.perl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 1a02a1242d..0959a782ec 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -4641,7 +4641,7 @@ sub git_print_log {\n \t# print log\n \tmy $skip_blank_line = 0;\n \tforeach my $line (@$log) {\n-\t\tif ($line =~ m/^\\s*([A-Z][-A-Za-z]*-[Bb]y|C[Cc]): /) {\n+\t\tif ($line =~ m/^\\s*([A-Z][-A-Za-z]*-([Bb]y|[Tt]o)|C[Cc]|(Clos|Fix)es): /) {\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"},{"id":"396234","messageId":"xmqqeesc9m9l.fsf@gitster.c.googlers.com","threadId":"53316","inReplyTo":"20200425021723.16346-1-me@pluvano.com","subject":"Re: [PATCH] gitweb: Recognize *-to and Closes/Fixes trailers","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-25T05:17:58Z","receivedAt":"2020-04-25T05:18:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Emma Brooks <me@pluvano.com> writes:\n\n> Commit trailers like \"Thanks-to:\", \"Fixes:\", and \"Closes:\" are fairly\n> common, but gitweb didn't highlight them like other trailers.\n\nDid you also sneak \"cc\" in without documenting/justifying?\n\nWhen the re becomes this complex, it may not be a bad idea to switch\nto \"/ ignore most whitespaces /x\" style for readability.\n\n> -\t\tif ($line =~ m/^\\s*([A-Z][-A-Za-z]*-[Bb]y|C[Cc]): /) {\n> +\t\tif ($line =~ m/^\\s*([A-Z][-A-Za-z]*-([Bb]y|[Tt]o)|C[Cc]|(Clos|Fix)es): /) {\n\n\t\tif ($line =~ m/^\\s*([A-Z][-A-Za-z]*-([Bb]y|[Tt]o) |\n\t\t\t\t    C[Cc] | Closes | Fixes ):\\s /x) { \n\nWell, I am sloppy and did not make it all that easier to read.\n\nMore experienced Perl folks certainly would be able to teach us a\nmuch better convention to format things like this more readble.\n\n"},{"id":"396236","messageId":"20200425062957.GA56088@pluvano.com","threadId":"53316","inReplyTo":"xmqqeesc9m9l.fsf@gitster.c.googlers.com","subject":"Re: [PATCH] gitweb: Recognize *-to and Closes/Fixes trailers","fromName":"Emma Brooks","fromEmail":"me@pluvano.com","sentAt":"2020-04-25T06:29:57Z","receivedAt":"2020-04-25T06:30:25Z","isPatch":true,"sender":{"key":"me@pluvano.com","avatar":"https://avatars.githubusercontent.com/u/50312486?v=4"},"body":"On 2020-04-24 22:17:58-0700, Junio C Hamano wrote:\n> Did you also sneak \"cc\" in without documenting/justifying?\n\nNo, that was already there in the original, before the colon:\n> > -\t\tif ($line =~ m/^\\s*([A-Z][-A-Za-z]*-[Bb]y|C[Cc]): /) {\n> > +\t\tif ($line =~ m/^\\s*([A-Z][-A-Za-z]*-([Bb]y|[Tt]o)|C[Cc]|(Clos|Fix)es): /) {\n"}]}