hooks:commit-msg: Allow links being overly long
Allow links on single lines and in git trailers.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user