Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753233AbdDKTXg (ORCPT ); Tue, 11 Apr 2017 15:23:36 -0400 Received: from smtprelay0023.hostedemail.com ([216.40.44.23]:44387 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752612AbdDKTXe (ORCPT ); Tue, 11 Apr 2017 15:23:34 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 64,4,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:960:967:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2332:2393:2559:2562:2693:2828:2902:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3872:4321:4605:5007:7576:8957:10004:10400:10848:11026:11232:11658:11914:12043:12438:12555:12740:12760:12895:13069:13095:13311:13357:13439:14181:14659:14721:21080:21433:30054:30070:30080:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: nerve78_5812b907aac3b X-Filterd-Recvd-Size: 1867 Message-ID: <1491938603.17839.25.camel@perches.com> Subject: Re: [PATCH v2] checkpatch: special audit for revert commit line From: Joe Perches To: Wei Wang , apw@canonical.com, Andrew Morton Cc: linux-kernel@vger.kernel.org Date: Tue, 11 Apr 2017 12:23:23 -0700 In-Reply-To: <20170411191532.74381-1-wvw@google.com> References: <20170411191532.74381-1-wvw@google.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1075 Lines: 27 On Tue, 2017-04-11 at 12:15 -0700, Wei Wang wrote: > From: Wei Wang > > Currently checkpatch.pl does not recognize git's default > commit revert message and will complain about the hash format. > Add special audit for revert commit message line to fix it. > > Signed-off-by: Wei Wang Acked-by: Joe Perches > --- > scripts/checkpatch.pl | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index baa3c7be04ad..9570db236ba3 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -2539,6 +2539,7 @@ sub process { > # Check for git id commit length and improperly formed commit descriptions > if ($in_commit_log && !$commit_log_possible_stack_dump && > $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i && > + $line !~ /^This reverts commit [0-9a-f]{7,40}/ && > ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i || > ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i && > $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&