DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] devtools: fix mailmap check for parentheses
@ 2023-06-26 10:24 Thomas Monjalon
  2023-07-03 23:40 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2023-06-26 10:24 UTC (permalink / raw)
  To: dev; +Cc: stable, Bruce Richardson, David Marchand

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

Signed-off-by: Thomas Monjalon <thomas@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-06  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 10:24 [PATCH] devtools: fix mailmap check for parentheses Thomas Monjalon
2023-07-03 23:40 ` Stephen Hemminger
2023-07-06  9:48   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).