Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
git-hooks: check for signed-off-by in the commit-msg hook
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic85bb838dfb236b7f1a244fd79f8ebeee0453a80
  • Loading branch information
vmiklos committed Nov 4, 2020
1 parent e9652b9 commit db10f7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .git-hooks/commit-msg
Expand Up @@ -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
Expand Down

0 comments on commit db10f7f

Please sign in to comment.