public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andy Whitcroft <apw@canonical.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: Yet another commit id improvement
Date: Tue, 19 Jul 2016 03:05:56 -0700	[thread overview]
Message-ID: <1468922756.1900.51.camel@perches.com> (raw)
In-Reply-To: <20160719095159.GA6746@brain>

On Tue, 2016-07-19 at 10:51 +0100, Andy Whitcroft wrote:
> On Mon, Jul 18, 2016 at 12:27:42PM -0700, Joe Perches wrote:
> > 
> > Using \b isn't good enough to isolate what appears to be a
> > commit id in a commit message.
> > 
> > Make sure there is a space or a quote like character after
> > a continuous run of hexadecimal characters that could be
> > a commit id.
[]
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > @@ -2460,9 +2460,9 @@ 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|BugLink):/i &&
> > +		    $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i &&
> >  		    ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
> > -		     ($line =~ /\b[0-9a-f]{12,40}\b/i &&
> > +		     ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
> If we expect a quote after would it be unreasonable to allow then at the
> beginning too?

Perhaps not.  The idea is the quote starts the commit description
not ends the commit SHA-1 hash.

  reply	other threads:[~2016-07-19 10:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 19:27 [PATCH] checkpatch: Yet another commit id improvement Joe Perches
2016-07-19  9:51 ` Andy Whitcroft
2016-07-19 10:05   ` Joe Perches [this message]
2016-07-21 12:27     ` Andy Whitcroft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468922756.1900.51.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qiuxu.zhuo@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox