History

checkpatch: special audit for revert commit line

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.

Wei Wang committed 9 years ago

Commit e882dbf1 parent e4b7d301 file · +1 −0Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+1−0
@@ -2539,6 +2539,7 @@ sub process { · 2538 unmodified lines
25392539 # Check for git id commit length and improperly formed commit descriptions
25402540 if ($in_commit_log && !$commit_log_possible_stack_dump &&
25412541 $line !~ /^\s*(?:Link|Patchwork|http|https|BugLink):/i &&
2542+ $line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
25422543 ($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
25432544 ($line =~ /(?:\s|^)[0-9a-f]{12,40}(?:[\s"'\(\[]|$)/i &&
25442545 $line !~ /[\<\[][0-9a-f]{12,40}[\>\]]/i &&