git-hooks: check for signed-off-by in the commit-msg hook
Signed-off-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: Ic85bb838dfb236b7f1a244fd79f8ebeee0453a80pull/510/head
parent
e9652b99b2
commit
db10f7f81e
|
@ -28,6 +28,12 @@ if test ! -f "$1" ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q "^Signed-off-by:" "$1"; then
|
||||
echo "Commit message is not signed off: $1"
|
||||
echo "Use 'git commit -s' to sign off the commit message."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Do not create a change id if requested
|
||||
if test "false" = "`git config --bool --get gerrit.createChangeId`" ; then
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue