devtools: fix name check with mbox files

Message ID 20221129135900.35770-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series devtools: fix name check with mbox files |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing warning Testing issues

Commit Message

David Marchand Nov. 29, 2022, 1:59 p.m. UTC
  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(-)
  

Comments

Tyler Retzlaff Nov. 29, 2022, 9:33 p.m. UTC | #1
On Tue, Nov 29, 2022 at 02:59:00PM +0100, David Marchand wrote:
> 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>
> ---

Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  
Thomas Monjalon Dec. 8, 2022, 11:19 a.m. UTC | #2
29/11/2022 22:33, Tyler Retzlaff:
> On Tue, Nov 29, 2022 at 02:59:00PM +0100, David Marchand wrote:
> > 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>
> 
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

Applied, thanks.
  

Patch

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