From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760970AbcHaSMS (ORCPT ); Wed, 31 Aug 2016 14:12:18 -0400 Received: from smtprelay0137.hostedemail.com ([216.40.44.137]:38245 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752273AbcHaSMP (ORCPT ); Wed, 31 Aug 2016 14:12:15 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:800:960:973:979:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2110:2393:2553:2559:2562:2828:2911:2919:3138:3139:3140:3141:3142:3355:3622:3653:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4362:4383:4425:5007:6119:6691:7903:7904:7974:8660:10004:10400:10450:10455:10848:11026:11232:11658:11783:11914:12043:12438:12663:12740:13095:13148:13161:13229:13230:13255:13439:13894:14093:14097:14181:14659:14721:19904:19999:21063:21080:21212:21324:21325:21433:30003:30006:30021:30029:30036:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: verse65_122af4574d458 X-Filterd-Recvd-Size: 3568 Message-ID: <1472667123.4176.27.camel@perches.com> Subject: Re: [PATCH] git-send-email: Add ability to cc: any "trailers" from commit message From: Joe Perches To: Junio C Hamano Cc: git@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 31 Aug 2016 11:12:03 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-08-31 at 10:54 -0700, Junio C Hamano wrote: > Joe Perches writes: > > > > Many commits have various forms of trailers similar to > >      "Acked-by: Name " and "Reported-by: Name " > > > > Add the ability to cc these trailers when using git send-email. > I thought you were asking what we call these " followed by > " at the end of the log message, and "footers or trailers" > was the answer. > > I do not have a strong objection against limiting to "-by:" lines; > for one thing, it would automatically avoid having to worry about > "Bug-ID:" and other trailers that won't have e-mail address at all. > > But if you are _only_ picking up "-by:" lines, then calling this > option "trailers" is way too wide and confusing.  I do not think > there is any specific name for "-by:" lines, though.  Perhaps you > would need to invent some name that has "-by" as a substring. > > "any-by"?  or just "by"?  I dunno. Thinking about this a little, "bylines" seems much better. > >@@ -1545,7 +1545,7 @@ foreach my $t (@files) { > >   # Now parse the message body > >   while(<$fh>) { > >   $message .=  $_; > > - if (/^(Signed-off-by|Cc): (.*)$/i) { > > + if (/^(Signed-off-by|Cc|[^\s]+[_-]by): (.*)$/i) { > Micronits: > >  (1) do you really want to grab a run of any non-blanks?  Don't >      you want to exclude at least a colon? It could use [\w_-]+ >  (2) allowing an underscore looks a bit unusual.   It's for typos.  A relatively high percentage of these things in at least the kernel were malformed when I started this 5 years ago. I don't have an objection to requiring the proper form using only dashes though. Maybe that'd help reduce the typo frequency anyway. > I am aware of the fact that people sometimes write only a name with > no e-mail address when giving credit to a third-party and we want to > avoid upsetting the underlying MTA by feeding it a non-address. > > Looking at existing helper subs like extract_valid_address and > sanitize_address that all addresses we pass to the MTA go through, > it appears to me that we try to support an addr-spec with only > local-part without @domain, so this new check might turn out to be > too strict from that point of view, but on the other hand I suspect > it won't be a huge issue because the addresses in the footers are > for public consumption and it may not make much sense to have a > local-only address there.  I dunno. > > > > >   push @cc, $c; > >   printf("(body) Adding cc: %s from line '%s'\n", me either but I think it doesn't hurt because as you suggest, these are supposed to be public. Thanks for the review. cheers, Joe