When passing a patch downloaded as mbox, the mail headers were being
scanned which resulted in mailing list and other unrelated mail
addresses being checked against the contributors list.

Filter them by focusing on the mail body (separated from the headers
with the first empty line).

Fixes: e83d41f0694d ("mailmap: add list of contributors")
Cc: sta...@dpdk.org

Signed-off-by: David Marchand <david.march...@redhat.com>
---
 devtools/checkpatches.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index be1cb03ea7..1dee094c7a 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -254,7 +254,7 @@ check_names() { # <patch>
        old_IFS=$IFS
        IFS='
 '
-       for contributor in $(sed -rn '1,/^--- / {s/.*: (.*<.*@.*>)/\1/p}' $1); 
do
+       for contributor in $(sed -rn '/^$/,/^--- / {s/.*: (.*<.*@.*>)/\1/p}' 
$1); do
                ! grep -qE "^$contributor($| <)" .mailmap || continue
                name=${contributor%% <*}
                if grep -q "^$name <" .mailmap; then
-- 
2.38.1

Reply via email to