diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-01 20:54:37 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-02 08:40:01 +0100 |
commit | e6ac01c7a18ef57d3c646ed747e96b15f71855f5 (patch) | |
tree | edb0a7ffeae00a97cf0801bd2b6fc8b20bc0b5a7 /scripts/git-hooks | |
parent | 51286059183e4ce0d208f6941ef96fb088a0b34f (diff) | |
download | coreutils-e6ac01c7a18ef57d3c646ed747e96b15f71855f5.tar.xz |
scripts: reject references to long-form bug URLs
* scripts/git-hooks/commit-msg: Require the normalized/shortened
form of bugzilla.redhat.com and bugs.gnu.org bug URLs.
Diffstat (limited to 'scripts/git-hooks')
-rwxr-xr-x | scripts/git-hooks/commit-msg | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg index 77703faab..96d594799 100755 --- a/scripts/git-hooks/commit-msg +++ b/scripts/git-hooks/commit-msg @@ -56,6 +56,12 @@ check_msg() test "$(get_msg | sed -n 2p)" \ && { echo "second line should be blank"; return 1; } + get_msg | grep -E 'https?://bugzilla\.redhat\.com/show_bug\.cgi' >&2 \ + && { echo 'use shorter http://bugzilla.redhat.com/NNNNNN'; return 1; } + + get_msg | grep -E 'https?://debbugs\.gnu\.org/cgi/bugreport\.cgi?bug=' >&2 \ + && { echo 'use shorter http://bugs.gnu.org/NNNNN'; return 1; } + # Flag redundant use of "issue" get_msg | grep -Fi "issue reported by" >&2 \ && { echo "just say: Reported by ..."; return 1; } |