From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754235AbcHaTjJ (ORCPT ); Wed, 31 Aug 2016 15:39:09 -0400 Received: from smtprelay0146.hostedemail.com ([216.40.44.146]:48222 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753384AbcHaTjI (ORCPT ); Wed, 31 Aug 2016 15:39:08 -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:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3352:3622:3653:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:5007:6117:7903:7904:10004:10400:10848:11232:11658:11783:11914:12043:12740:13069:13095:13255:13311:13357:13439:13894:14181:14659:14721:21080:21212:21324:21433:30054: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:16,LUA_SUMMARY:none X-HE-Tag: son83_325a6161ce319 X-Filterd-Recvd-Size: 1811 Message-ID: <1472672344.4176.32.camel@perches.com> Subject: Re: [PATCH V2] git-send-email: Add ability to cc: any "bylines" in the commit message From: Joe Perches To: Junio C Hamano Cc: git@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 31 Aug 2016 12:39:04 -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 12:34 -0700, Junio C Hamano wrote: > Joe Perches writes: > > Many commits have various forms of bylines similar to > A missing blank line (I can tweak while queuing). [] > > + next if $suppress_cc{'bylines'} and $what !~ /Signed-off-by/i and $what =~ /by$/i; > Having to keep this /by$/i in sync with whatever definition of > bylines is will be error prone.  How about doing it in this way? > > # Now parse the message body > + my $bypat = r/[\w-]+-by/; > while (<$fh>) { >          ... >                 if (/^(Signed-off-by|Cc|$bypat): (.*)$/i) { >                  ... >                          next if $suppress_cc{'bodycc'} and $what =~ /Cc/i; > + next if $suppress_cc{'bylines'} and > + $what !~ /^Signed-off-by/i and > + $what =~ /^$bypat/i; > > Other than that, looking good. Sure, whatever you want, do you want a v3 from me or can you fix it up however you want?