* CONTRIBUTE: Prefer https: when citing.
* build-aux/git-hooks/commit-msg:
Diagnose http: and ftp: URLs to FSF or GNU hosts.
bug number NNNNN in the debbugs database. This string is often
parenthesized, as in "(Bug#19003)".
+- When citing URLs, prefer https: to http: when either will do. In
+ particular, gnu.org and fsf.org URLs should start with "https:".
+
- Commit messages should contain only printable UTF-8 characters.
- Commit messages should not contain the "Signed-off-by:" lines that
non_print = "[^[:print:]]"
}
}
+ c_lower = "abcdefghijklmnopqrstuvwxyz"
+ unsafe_gnu_url = "(http|ftp)://([" c_lower ".]*\\.)?(gnu|fsf)\\.org"
}
/^#/ {
status = 1
}
+ {
+ if (match($0, unsafe_gnu_url)) {
+ url = substr($0, RSTART, RLENGTH)
+ printf "Use https: URL instead of '\''%s'\'' in commit message\n", url
+ status = 1
+ }
+ }
+
$0 ~ non_print {
print "Unprintable character in commit message"
status = 1