diff options
author | Joe Perches <joe@perches.com> | 2016-08-02 14:04:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 19:35:11 -0400 |
commit | aab38f516aa99e8132f906a526bf44fa59e9daa3 (patch) | |
tree | 4781120e22a28dff69e522d2a39552cf91f8584b /scripts | |
parent | dadf680de3c2eb4cba9840619991eda0cfe98778 (diff) | |
download | linux-stable-aab38f516aa99e8132f906a526bf44fa59e9daa3.tar.gz linux-stable-aab38f516aa99e8132f906a526bf44fa59e9daa3.tar.bz2 linux-stable-aab38f516aa99e8132f906a526bf44fa59e9daa3.zip |
checkpatch: yet another commit id improvement
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.
Link: http://lkml.kernel.org/r/fdd22b47463a21c21132edbb8aa35e372950a1e6.1468869915.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 79273003d5e7..7a28775274a5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2459,9 +2459,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 && $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i && $line !~ /\bfixes:\s*[0-9a-f]{12,40}/i))) { my $init_char = "c"; |