Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1446313

Re: [PATCH] checkpatch: Yet another commit id improvement

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] checkpatch: Yet another commit id improvement
Date 2016-07-19 12:10 +0200
Message-ID <rWA8q-2Hf-31@gated-at.bofh.it> (permalink)
References <rWmoO-1Wa-23@gated-at.bofh.it> <rWzYK-2o0-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] checkpatch: Yet another commit id improvement Joe Perches <joe@perches.com> - 2016-07-18 21:30 +0200
  Re: [PATCH] checkpatch: Yet another commit id improvement Andy Whitcroft <apw@canonical.com> - 2016-07-19 12:00 +0200
    Re: [PATCH] checkpatch: Yet another commit id improvement Joe Perches <joe@perches.com> - 2016-07-19 12:10 +0200
      Re: [PATCH] checkpatch: Yet another commit id improvement Andy Whitcroft <apw@canonical.com> - 2016-07-21 14:30 +0200

csiph-web