[PATCH] devtools: fix mailmap check for parentheses
Thomas Monjalon
thomas at monjalon.net
Mon Jun 26 12:24:03 CEST 2023
When checking names having parentheses, the grep matching was failing.
It is fixed by escaping the open parenthesis.
Also, the mailmap path was relative to the root directory.
The path is made absolute.
Fixes: e83d41f0694d ("mailmap: add list of contributors")
Fixes: 83812de4f2f3 ("devtools: move mailmap check after patch applied")
Cc: stable at dpdk.org
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
devtools/check-git-log.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index af751e49ab..89544a2cc5 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -264,8 +264,10 @@ names=$(git log --format='From: %an <%ae>%n%b' --reverse $range |
sed -rn 's,.*: (.*<.*@.*>),\1,p' |
sort -u)
bad=$(for contributor in $names ; do
+ contributor=${contributor//(/\\(}
! grep -qE "^$contributor($| <)" $selfdir/../.mailmap || continue
- if grep -q "^${contributor%% <*} <" .mailmap ; then
+ name=${contributor%% <*}
+ if grep -q "^$name <" $selfdir/../.mailmap ; then
printf "\t$contributor is not the primary email address\n"
else
printf "\t$contributor is unknown in .mailmap\n"
--
2.41.0
More information about the dev
mailing list