diff --git a/meta/git/hooks/commit-msg b/meta/git/hooks/commit-msg index d9beda3..df5d961 100755 --- a/meta/git/hooks/commit-msg +++ b/meta/git/hooks/commit-msg @@ -68,6 +68,11 @@ BKP_IFS="$IFS" IFS=' ' for line in $body; do - [[ ${#line} -le 72 ]] || die "Body lines too long. (<= 72)" + [[ ${#line} -gt 72 ]] || continue + + # Allow links on single lines and in trailers + [[ ! $line =~ ^([-A-Za-z0-9]*:)?[\ \ ]*https?://[^\ ]*$ ]] || continue + + die "Body lines too long. (<= 72)" done IFS="$BKP_IFS"