diff options
author | наб <[email protected]> | 2021-06-03 19:40:09 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-06-11 09:10:25 -0700 |
commit | 10bcc4da6ceced9746fe498f12d0603951258367 (patch) | |
tree | fedff4c4594a639938a696aa3256589887989587 /scripts/commitcheck.sh | |
parent | feb04e66802ef96aa77951c43d4b632b376041ef (diff) |
scripts/commitcheck.sh: fix false positive for signed commits
Reviewed-by: John Kennedy <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12105
Diffstat (limited to 'scripts/commitcheck.sh')
-rwxr-xr-x | scripts/commitcheck.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/commitcheck.sh b/scripts/commitcheck.sh index 0077eb6b0..cb9fd66c6 100755 --- a/scripts/commitcheck.sh +++ b/scripts/commitcheck.sh @@ -7,7 +7,7 @@ REF="HEAD" test_commit_bodylength() { length="72" - body=$(git log -n 1 --pretty=%b "$REF" | grep -Ev "http(s)*://" | grep -E -m 1 ".{$((length + 1))}") + body=$(git log --no-show-signature -n 1 --pretty=%b "$REF" | grep -Ev "http(s)*://" | grep -E -m 1 ".{$((length + 1))}") if [ -n "$body" ]; then echo "error: commit message body contains line over ${length} characters" return 1 @@ -20,7 +20,7 @@ test_commit_bodylength() check_tagged_line() { regex='^[[:space:]]*'"$1"':[[:space:]][[:print:]]+[[:space:]]<[[:graph:]]+>$' - foundline=$(git log -n 1 "$REF" | grep -E -m 1 "$regex") + foundline=$(git log --no-show-signature -n 1 "$REF" | grep -E -m 1 "$regex") if [ -z "$foundline" ]; then echo "error: missing \"$1\"" return 1 @@ -35,7 +35,7 @@ new_change_commit() error=0 # subject is not longer than 72 characters - long_subject=$(git log -n 1 --pretty=%s "$REF" | grep -E -m 1 '.{73}') + long_subject=$(git log --no-show-signature -n 1 --pretty=%s "$REF" | grep -E -m 1 '.{73}') if [ -n "$long_subject" ]; then echo "error: commit subject over 72 characters" error=1 @@ -57,7 +57,7 @@ new_change_commit() is_coverity_fix() { # subject starts with Fix coverity defects means it's a coverity fix - subject=$(git log -n 1 --pretty=%s "$REF" | grep -E -m 1 '^Fix coverity defects') + subject=$(git log --no-show-signature -n 1 --pretty=%s "$REF" | grep -E -m 1 '^Fix coverity defects') if [ -n "$subject" ]; then return 0 fi @@ -70,7 +70,7 @@ coverity_fix_commit() error=0 # subject starts with Fix coverity defects: CID dddd, dddd... - subject=$(git log -n 1 --pretty=%s "$REF" | + subject=$(git log --no-show-signature -n 1 --pretty=%s "$REF" | grep -E -m 1 'Fix coverity defects: CID [[:digit:]]+(, [[:digit:]]+)*') if [ -z "$subject" ]; then echo "error: Coverity defect fixes must have a subject line that starts with \"Fix coverity defects: CID dddd\"" @@ -86,7 +86,7 @@ coverity_fix_commit() OLDIFS=$IFS IFS=' ' - for line in $(git log -n 1 --pretty=%b "$REF" | grep -E '^CID'); do + for line in $(git log --no-show-signature -n 1 --pretty=%b "$REF" | grep -E '^CID'); do if ! echo "$line" | grep -qE '^CID [[:digit:]]+: ([[:graph:]]+|[[:space:]])+ \(([[:upper:]]|\_)+\)'; then echo "error: commit message has an improperly formatted CID defect line" error=1 |