Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp715462pxb; Fri, 13 Aug 2021 04:54:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7FR0D35jaiTBcawgHbOtyETh4wQEAggyZ3sDtk+4yzCOXp2dBWoIu8FlglUC+xOm7rgZz X-Received: by 2002:a02:2307:: with SMTP id u7mr1955073jau.28.1628855698966; Fri, 13 Aug 2021 04:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628855698; cv=none; d=google.com; s=arc-20160816; b=Tw04B4H/PMb2Ubux7tmWZTpv8wT1BZUVKZQmfTaFsc9CUuVqNhZs8yVFdKddK+3dJj CsZWrCfKfSHOWjSdWmm+UgUE+/xCz9quz4XyxbIOiKycdh6yMQ+1yNSiA20TklkS5Gf5 1NjOs/n6mftfrInbcA3sipRY02JSorBmHQeyr2Q2z6p5VwfvaQ1seSXYxXS4ix6+mIIU 1/w/2yqHjsGN+X3Y0aXhvCZClrnmht6DZ+2AvLU9UaTAH3RWVeAqyf2BdUbj6oK8mCr0 yUuQ8C98MwmA1RsLpti49U2TxkIBtNpSuugRtce5wc2uIPGH7MlOtXgXIzDrpXo1Yzyo rctQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :cc:to:subject:from:date; bh=/SDraBogLPLtZ/cQdhwpp6DwRJSfxhFdFF5JH8BdSZg=; b=c8ls0pUK6Y3EGklT5asDe/C/dNAwIgXh1TCQuQdwsmotrfj1fAETlKLDgoevWLkHNy FoMsEXu/uM3I2wzToazjEkKoOH6kPXkZnDsluU+iOqtQkbS+Otuk529UT5ngqrkunI04 er7VASKSbEEdmHQjG03PKbj7HZkwmYX5OdHRhr6vu2vjj47EkO3T+nUImaagM8Y0fs04 Vv3XW0r+tv1gaAzvcN3W9fV2Cb4L/WW5iqzmRoDQxfkeAsYll9I8Z1nyrTfg+B2pnaqs 5kMtu1QMtYSoy3W1sq3EBtO0w9AP0N8p7DwI+Edi+29BexPd59S0Xc9f6lpTln1Qn5IR UPjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si1445424jav.94.2021.08.13.04.54.45; Fri, 13 Aug 2021 04:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239948AbhHMLgm (ORCPT + 99 others); Fri, 13 Aug 2021 07:36:42 -0400 Received: from mta-14-3.privateemail.com ([198.54.127.110]:24182 "EHLO MTA-14-3.privateemail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238157AbhHMLgl (ORCPT ); Fri, 13 Aug 2021 07:36:41 -0400 Received: from mta-14.privateemail.com (localhost [127.0.0.1]) by mta-14.privateemail.com (Postfix) with ESMTP id 1053318000AE; Fri, 13 Aug 2021 07:36:15 -0400 (EDT) Received: from [192.168.0.46] (unknown [10.20.151.243]) by mta-14.privateemail.com (Postfix) with ESMTPA id 0B78018000A7; Fri, 13 Aug 2021 07:36:13 -0400 (EDT) Date: Fri, 13 Aug 2021 07:36:07 -0400 From: Hamza Mahfooz Subject: Re: [PATCH] checkpatch: fix an issue regarding the git commit description style test To: linux-kernel@vger.kernel.org Cc: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Message-Id: <780SXQ.MZOU8I5AWGU63@effective-light.com> In-Reply-To: <20210714082608.28918-1-someguy@effective-light.com> References: <20210714082608.28918-1-someguy@effective-light.com> X-Mailer: geary/40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ping On Wed, Jul 14 2021 at 04:26:07 AM -0400, Hamza Mahfooz wrote: > If we consider the output of the following command: > > $ git shortlog | grep '"' | wc -l > 14185 > > It becomes apparent that quite a number of commits have titles that, > contain at least one quotation mark and if you attempt to refer to > those > commits in a new patch, checkpatch throws a false positive. This is > because, checkpatch disallows the use of quotation marks in commit > titles, > only when referring to those commits in commit descriptions. > > Signed-off-by: Hamza Mahfooz > --- > scripts/checkpatch.pl | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 461d4221e4a4..cf31e8c994d3 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -3200,20 +3200,20 @@ sub process { > $long = 1 if ($line =~ /\bcommit\s+[0-9a-f]{41,}/i); > $space = 0 if ($line =~ /\bcommit [0-9a-f]/i); > $case = 0 if ($line =~ /\b[Cc]ommit\s+[0-9a-f]{5,40}[^A-F]/); > - if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)"\)/i) { > + if ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.+)"\)/i) { > $orig_desc = $1; > $hasparens = 1; > } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s*$/i && > defined $rawlines[$linenr] && > - $rawlines[$linenr] =~ /^\s*\("([^"]+)"\)/) { > + $rawlines[$linenr] =~ /^\s*\("(.+)"\)/) { > $orig_desc = $1; > $hasparens = 1; > - } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("[^"]+$/i && > + } elsif ($line =~ /\bcommit\s+[0-9a-f]{5,}\s+\(".+$/i && > defined $rawlines[$linenr] && > - $rawlines[$linenr] =~ /^\s*[^"]+"\)/) { > - $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("([^"]+)$/i; > + $rawlines[$linenr] =~ /^\s*.+"\)/) { > + $line =~ /\bcommit\s+[0-9a-f]{5,}\s+\("(.+)$/i; > $orig_desc = $1; > - $rawlines[$linenr] =~ /^\s*([^"]+)"\)/; > + $rawlines[$linenr] =~ /^\s*(.+)"\)/; > $orig_desc .= " " . $1; > $hasparens = 1; > } > -- > 2.32.0 >