Skip to content

Commit

Permalink
devtools: fix mailmap check for parentheses
Browse files Browse the repository at this point in the history
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: e83d41f ("mailmap: add list of contributors")
Fixes: 83812de ("devtools: move mailmap check after patch applied")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  • Loading branch information
tmonjalo committed Jul 6, 2023
1 parent df60837 commit 6fd14c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion devtools/check-git-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6fd14c1

Please sign in to comment.