devtools: fix mailmap check for parentheses
PATCH 1/1 devtools: fix mailmap check for parentheses
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")
Signed-off-by Thomas Monjalon <[email protected]>
--- devtools/check-git-log.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
devtools/check-git-log.sh +3 -1
@@ -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"
Signature · 1 line
2.41.0
Quoted 6 lines · On Mon, 26 Jun 2023 12:24:03 +0200 Thomas Monjalon <[email protected]> wrote:
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.
Quoted 6 lines
Fixes e83d41f0694d ("mailmap: add list of contributors")Fixes 83812de4f2f3 ("devtools: move mailmap check after patch applied")Signed-off-by Thomas Monjalon <[email protected]>---
Thomas Monjalon
Applied04/07/2023 01:40, Stephen Hemminger:
Quoted 9 lines
Quoted 6 lines · On Mon, 26 Jun 2023 12:24:03 +0200 Thomas Monjalon <[email protected]> wrote:
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.
Quoted 8 lines
Quoted 6 lines
Fixes e83d41f0694d ("mailmap: add list of contributors")Fixes 83812de4f2f3 ("devtools: move mailmap check after patch applied")Signed-off-by Thomas Monjalon <[email protected]>---
Applied