[lkml]   [2020]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH v2 1/1] checkpatch: support "base-commit:" format
In order to support the tool described in [1], I ran:

git format-patch --base=<commit> --cover-letter <revrange>

...which generated a "base-commit: <commit-hash>" tag at the end of the
cover letter. However, generated an error upon encounting
"base-commit:" in the cover letter:

"ERROR: Please use git commit description style..."

...because it found the "commit" keyword, and failed to recognize that
it was part of the "base-commit" phrase, and as such, should not be
subjected to the same commit description style rules.

Update to include a special case for "base-commit:" (at
the start of the line, possibly with some leading whitespace) so
that that tag no longer generates a checkpatch error.

[1] "Better tools for kernel

Cc: Andy Whitcroft <>
Suggested-by: Joe Perches <>
Cc: Konstantin Ryabitsev <>
Cc: Jonathan Corbet <>
Signed-off-by: John Hubbard <>
scripts/ | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ b/scripts/
index a63380c6b0d2..1e66fc7a2f2f 100755
--- a/scripts/
+++ b/scripts/
@@ -2761,7 +2761,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 !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/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 &&
 \ /
  Last update: 2020-02-13 06:51    [W:0.033 / U:3.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site