From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965450AbdCWPzj (ORCPT ); Thu, 23 Mar 2017 11:55:39 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:55508 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965009AbdCWPzh (ORCPT ); Thu, 23 Mar 2017 11:55:37 -0400 Date: Thu, 23 Mar 2017 08:55:32 -0700 From: Darren Hart To: Joe Perches Cc: Andrew Morton , Andy Whitcroft , "John 'Warthog9' Hawley" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] checkpatch: Allow space leading blank lines in email headers Message-ID: <20170323155532.GA19910@fury> References: <20170323062057.GE17578@localhost.localdomain> <1490250520.2041.22.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490250520.2041.22.camel@perches.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 22, 2017 at 11:28:40PM -0700, Joe Perches wrote: > On Wed, 2017-03-22 at 23:20 -0700, Darren Hart wrote: > > I do have an open question regarding how we're going about testing for the end > > of the header lines. Since we're not just testing for an empty line to separate > > headers and body, there is clearly more going on here - but I'm not sure what it > > is ... so I can't be sure this doesn't have an unintended consequence. > > > > > + $rawline =~ /^(?:commit\b|from\b|[\w-]+:)/i)) { > > > > This appears to be an unrelated change, introducing the non-capturing-group > > (?:) and dropping the superfluous .*$ postfix. Did I get that right? > > Exactly right. > > The capturing of the initial bit of the match and > testing of the rest of the line is simply unnecessary. > > I frequently make localized changes like that when I > notice them. It's not a problem. Thanks Joe. Your call, when I see unrelated changes in patches to me I ask that they be broken out or at least mentioned in the commit log - which is why I asked, in case it slipped in unintentionally. The fix addresses my concern in what appears to be the simplest possible way, and generally for long header fields, with minimal change. In addition to my tested-by, feel free to include my review tag: Reviewed-by: Darren Hart (VMware) Thanks to both you and John for the time on this. -- Darren Hart VMware Open Source Technology Center