[PATCH] devtools: fix bad substitution

Raslan Darawsheh rasland at nvidia.com
Tue Jul 11 09:16:19 CEST 2023


When running check-git-log, it showed a Bad substitution.

It is fixed by using tr to escape the open parenthesis.

Fixes: 6fd14c1b58e6 ("devtools: fix mailmap check for parentheses")
Cc: thomas at monjalon.net

Suggested-by: Thomas Monjalon <thomas at monjalon.net>
Signed-off-by: Raslan Darawsheh <rasland at nvidia.com>
---
 devtools/check-git-log.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 89544a2cc5..5c869b7683 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -264,7 +264,7 @@ 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//(/\\(}
+	contributor=$(echo $contributor | tr '(' '\\(')
 	! grep -qE "^$contributor($| <)" $selfdir/../.mailmap || continue
 	name=${contributor%% <*}
 	if grep -q "^$name <" $selfdir/../.mailmap ; then
-- 
2.25.1



More information about the dev mailing list