scripts: fix the Signed-off-by:-prohibiting hook to actually work
authorJim Meyering <meyering@redhat.com>
Fri, 31 Aug 2012 10:52:08 +0000 (12:52 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 31 Aug 2012 11:09:27 +0000 (13:09 +0200)
* scripts/git-hooks/commit-msg: Fix new test: we're searching a
multi-line buffer, so add the //m modifier.

scripts/git-hooks/commit-msg

index f867331..56286d4 100755 (executable)
@@ -125,7 +125,7 @@ sub check_msg($$)
   $buf =~ m!https?://debbugs\.gnu\.org/(?:cgi/bugreport\.cgi\?bug=)?(\d+)!s
     and return "use shorter http://bugs.gnu.org/$1";
 
-  $buf =~ /^ *Signed-off-by:/i
+  $buf =~ /^ *Signed-off-by:/mi
     and return q(do not use "Signed-off-by:");
 
   return '';