aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-12-30 14:52:46 +0100
committerMichał Górny <mgorny@gentoo.org>2019-04-09 13:05:55 +0200
commit9ba99e3e2ff9fce892e2674475a0c2dbe3823933 (patch)
treefc747d3ab905cb7036a17c3a7de7dbd7470d25d0
parentupdate-06-copyright: Support new/removed branches better (diff)
downloadgithooks-9ba99e3e2ff9fce892e2674475a0c2dbe3823933.tar.gz
githooks-9ba99e3e2ff9fce892e2674475a0c2dbe3823933.tar.bz2
githooks-9ba99e3e2ff9fce892e2674475a0c2dbe3823933.zip
update-06-copyright: improve messages
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rwxr-xr-xlocal/tests/update-06-copyright.sh12
-rwxr-xr-xlocal/update-06-copyright16
2 files changed, 18 insertions, 10 deletions
diff --git a/local/tests/update-06-copyright.sh b/local/tests/update-06-copyright.sh
index 0b93044..4edaa72 100755
--- a/local/tests/update-06-copyright.sh
+++ b/local/tests/update-06-copyright.sh
@@ -35,14 +35,16 @@ ldapsearch() {
}
# Error message patterns
-FAIL_NO_SIGNOFF="*: no GCO sign-off present"
-FAIL_EMAIL="*: no sign-off matching committer's e-mail address found!
+FAIL_NO_SIGNOFF="*: missing Signed-off-by on commit
*"
-FAIL_SYNTAX="*: malformed sign-off (should be: real name <email>)!
+FAIL_EMAIL="*: no Signed-off-by line matching committer's e-mail address found!
*"
-FAIL_REALNAME="*: name of sign-off does not match realname in LDAP!
+FAIL_SYNTAX="*: malformed Signed-off-by (should be: real name <email>)!
+*"
+FAIL_REALNAME="*: name in Signed-off-by does not match realname in LDAP!
+*"
+FAIL_LICENSE="*: DCO-1.1 Signed-off-by used on license directory!
*"
-FAIL_LICENSE="*: DCO-1.1 sign-off used on license directory!"
# Non-developer commit tests (for repos that allow those)
export GL_USER=nondev@example.com
diff --git a/local/update-06-copyright b/local/update-06-copyright
index ec308e0..82cba58 100755
--- a/local/update-06-copyright
+++ b/local/update-06-copyright
@@ -143,27 +143,33 @@ while read -r commithash; do
case ${signoff} in
no)
- echo "${commithash}: no GCO sign-off present"
+ echo "${commithash}: missing Signed-off-by on commit"
ret=1;;
syntaxerr)
- echo "${commithash}: malformed sign-off (should be: real name <email>)!"
+ echo "${commithash}: malformed Signed-off-by (should be: real name <email>)!"
echo " ${line}"
ret=1;;
dcolicense)
- echo "${commithash}: DCO-1.1 sign-off used on license directory!"
+ echo "${commithash}: DCO-1.1 Signed-off-by used on license directory!"
ret=1;;
diffmail)
- echo "${commithash}: no sign-off matching committer's e-mail address found!"
+ echo "${commithash}: no Signed-off-by line matching committer's e-mail address found!"
echo " expected: ${committer}"
echo " last found: ${mail}"
ret=1;;
diffname)
- echo "${commithash}: name of sign-off does not match realname in LDAP!"
+ echo "${commithash}: name in Signed-off-by does not match realname in LDAP!"
echo " expected: ${cn_expected} (${gecos_expected})"
echo " last found: ${realname}"
ret=1;;
esac
done < <(git rev-list "${rev_list_arg}")
+if [[ ${ret} == 1 ]]; then
+ echo
+ echo "Please make sure to read the copyright policy before adding Signed-off-by!"
+ echo " https://www.gentoo.org/glep/glep-0076.html"
+fi
+
# --- Finished
exit "${ret}"