From: Jim Meyering Date: Tue, 1 Nov 2011 19:54:37 +0000 (+0100) Subject: scripts: reject references to long-form bug URLs X-Git-Tag: v8.15~104 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6ac01c7a18ef57d3c646ed747e96b15f71855f5;p=platform%2Fupstream%2Fcoreutils.git 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. --- diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg index 77703fa..96d5947 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; }