hooks:commit-msg: Relax subject length limit to 60

There is no need to be that pedantic.
This commit is contained in:
2024-10-16 14:24:04 +02:00
parent dd5663b564
commit a376ff7b78

View File

@@ -37,7 +37,11 @@ body="$(
/^[^${git_comment_char/auto/\#}]/p"
)"
[[ ${#subject} -le 50 ]] || die "Subject too long. (<= 50)"
if [[ ${#subject} -gt 60 ]]; then
die "Subject too long. (<= 60)"
elif [[ ${#subject} -gt 50 ]]; then
>&2 printf "%s: Subject exceeds recommendation of 50 characters!\n" "$0"
fi
# The subject line has to match "${pats[@]}", but to be more verbose different
# error messages are printed for the different 'levels' of the pattern.