From: Alex Hornung Date: Sat, 25 Jun 2011 18:18:54 +0000 (+0100) Subject: tools - Add a git commit-msg hook for MFC'ing X-Git-Tag: v2.12.0~433 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/dae31c504c8cc76034bbfd7a20aaef9c27b1e243 tools - Add a git commit-msg hook for MFC'ing --- diff --git a/tools/commit-msg b/tools/commit-msg new file mode 100755 index 0000000..844a9a0 --- /dev/null +++ b/tools/commit-msg @@ -0,0 +1,15 @@ +#!/bin/sh +# +# This commit-msg hook tries to guess whether the current commit addresses +# an existing bug based on a number of keywords in the commit message and +# reminds the committer of MFC'ing it. + +lines=`grep -Ei 'CVE|vulnerability|fix|panic|bug|Reported-by|Dragonfly-bug' "$1" | grep -v '^#'` + +if [ "$lines" != "" ]; then + echo '' + echo -n 'NOTE: ' + echo >&2 This commit seems to fix an existing issue, please \ + consider MFC\'ing it to the current stable release. + echo '' +fi