[PATCH] dim: Allow to push the commit if name without accent is matching

Benjamin Gaignard benjamin.gaignard at st.com
Tue Dec 3 09:34:55 UTC 2019


It may happen that author name and signed-off-by are not matching because
of accent characters. Allow push the commit if the name without accent is
matching.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard at st.com>
---
 dim | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dim b/dim
index 1c2da8034cd3..ea35b93cb131 100755
--- a/dim
+++ b/dim
@@ -878,7 +878,7 @@ function checkpatch_commit_push
 	committer=$(git show -s $sha1 --format="format:%cn")
 	# outlook mangles mails into "Last, First"
 	author_outlook=$(git show -s $sha1 --format="format:%an" | sed -e 's/\([^ ]*\) \(.*\)/\2, \1/')
-
+	author_translit=$(echo $author | iconv -t ASCII//TRANSLIT)
 
 	# check for fd.o mailman From: mangling
 	if git show -s $sha1 --format="format:%ae %ce"| grep -q '@lists\.freedesktop\.org' ; then
@@ -887,7 +887,7 @@ function checkpatch_commit_push
 	fi
 
 	# check for author sign-off
-	if ! git show -s $sha1 | grep -qi "Signed-off-by:.*\\($author\\|$author_outlook\\)" ; then
+	if ! git show -s $sha1 | grep -qi "Signed-off-by:.*\\($author\\|$author_outlook\\|$author_translit\\)" ; then
 		echoerr "$cite: author Signed-off-by missing."
 		rv=1
 	fi
-- 
2.15.0



More information about the dim-tools mailing list