scripts: encourage use of shorter "bugs.gnu.org" in bug URLs
authorJim Meyering <meyering@redhat.com>
Thu, 10 May 2012 08:24:02 +0000 (10:24 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 10 May 2012 09:02:46 +0000 (11:02 +0200)
* scripts/git-hooks/commit-msg: Also ding debbugs.gnu.org URLs.

scripts/git-hooks/commit-msg

index e1bb382..3c1c63d 100755 (executable)
@@ -122,7 +122,7 @@ sub check_msg($$)
   $buf =~ m!https?://bugzilla\.redhat\.com/show_bug\.cgi\?id=(\d+)!s
     and return "use shorter http://bugzilla.redhat.com/$1";
 
-  $buf =~ m!https?://debbugs\.gnu\.org/cgi/bugreport\.cgi\?bug=(\d+)!s
+  $buf =~ m!https?://debbugs\.gnu\.org/(?:cgi/bugreport\.cgi\?bug=)?(\d+)!s
     and return "use shorter http://bugs.gnu.org/$1";
 
   return '';