devtools: fix name check with mbox files
Checks
Commit Message
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
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>
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.
@@ -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