From: Jim Meyering Date: Thu, 30 Aug 2012 11:07:10 +0000 (+0200) Subject: scripts: git commit message hook: prohibit use of "Signed-off-by:" X-Git-Tag: v8.20~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19baf1679d175151acf8d0f3dafebc7c1ca5e417;p=thirdparty%2Fcoreutils.git scripts: git commit message hook: prohibit use of "Signed-off-by:" * scripts/git-hooks/commit-msg: Reject a commit log message that contains "Signed-off-by:". --- diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg index a5e409071c..f867331d2c 100755 --- a/scripts/git-hooks/commit-msg +++ b/scripts/git-hooks/commit-msg @@ -125,6 +125,9 @@ 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 + and return q(do not use "Signed-off-by:"); + return ''; }