From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 86191A04FD;
	Tue, 29 Nov 2022 14:59:26 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id E668842686;
	Tue, 29 Nov 2022 14:59:24 +0100 (CET)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [170.10.129.124])
 by mails.dpdk.org (Postfix) with ESMTP id BF08040691
 for <dev@dpdk.org>; Tue, 29 Nov 2022 14:59:22 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1669730361;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=1tigjCOn1wQfGSscn9ZPx360uagtu6Rbv2Ui2wYAfbw=;
 b=cr7Oz1/m9aPQssPY+UykdWVYOmrk+WTCzAMDjrD2nHQXvoOkWBKFJXGzIVxeWaInWmFfav
 9E9+nXQMzqmKVMj89WUQysIg0I/avPRvTRFagrsAVUwGT8EX99Is8NwcD+JMFJcf6SmZSr
 pebpF7XvDAoIbp1ML+hSM75Xat2ZXOg=
Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com
 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 us-mta-217-ozKxvq3ZPPqIMeom4yOtrg-1; Tue, 29 Nov 2022 08:59:18 -0500
X-MC-Unique: ozKxvq3ZPPqIMeom4yOtrg-1
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com
 [10.11.54.3])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6A7401C05159;
 Tue, 29 Nov 2022 13:59:15 +0000 (UTC)
Received: from localhost.localdomain (ovpn-192-236.brq.redhat.com
 [10.40.192.236])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 45926112131E;
 Tue, 29 Nov 2022 13:59:14 +0000 (UTC)
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
 Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH] devtools: fix name check with mbox files
Date: Tue, 29 Nov 2022 14:59:00 +0100
Message-Id: <20221129135900.35770-1-david.marchand@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="US-ASCII"; x-default=true
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

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: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@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