diff options
author | 2018-12-30 14:52:46 +0100 | |
---|---|---|
committer | 2019-04-09 13:05:55 +0200 | |
commit | 9ba99e3e2ff9fce892e2674475a0c2dbe3823933 (patch) | |
tree | fc747d3ab905cb7036a17c3a7de7dbd7470d25d0 | |
parent | update-06-copyright: Support new/removed branches better (diff) | |
download | githooks-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-x | local/tests/update-06-copyright.sh | 12 | ||||
-rwxr-xr-x | local/update-06-copyright | 16 |
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}" |