Skip to contentSkip to conversation

devtools: fix name check with mbox files

PATCH Applied David Marchand 3 participants 3 messages Nov 29, 2022 – Dec 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devtools: fix name check with mbox files

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")
---
 devtools/checkpatches.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
devtools/checkpatches.sh +1 -1
index be1cb03ea7..1dee094c7a 100755
@@ -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
Signature · 1 line
2.38.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · David Marchand

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.

Quoted 8 lines

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

Fixes e83d41f0694d ("mailmap: add list of contributors")

---

#2 lore raw

29/11/2022 22:33, Tyler Retzlaff:

Quoted 8 lines · David Marchand
Quoted 7 lines

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).

Quoted 6 lines
Quoted 4 lines
Fixes e83d41f0694d ("mailmap: add list of contributors")

Applied, thanks.