The duplicate-trailer and self-review checks matched trailer-like
lines inside the diff body, not just in the commit message. Gate
the check on !$is_patch so it only runs before the diff starts.

Fixes: c3db8e70451 ("scripts/checkpatch: warn on duplicate trailers and 
self-review")
Signed-off-by: Marc-André Lureau <[email protected]>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9838a6417851..c023767f9670 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1834,7 +1834,7 @@ sub process {
                }
 
 # Check for duplicate trailers and self-review
-               if (!$in_header_lines &&
+               if (!$in_header_lines && !$is_patch &&
                    $line =~ /^\s*([A-Z][a-zA-Z]*(?:-[a-zA-Z]+)*):\s*(.+)/) {
                        my $trailer_type = $1;
                        my $trailer_value = $2;

-- 
2.56.0.rc0.29.g47ce80527c56


Reply via email to