summaryrefslogtreecommitdiff
path: root/git-hooks/git_post_commit_hook
diff options
context:
space:
mode:
Diffstat (limited to 'git-hooks/git_post_commit_hook')
-rwxr-xr-xgit-hooks/git_post_commit_hook19
1 files changed, 19 insertions, 0 deletions
diff --git a/git-hooks/git_post_commit_hook b/git-hooks/git_post_commit_hook
new file mode 100755
index 0000000..cc47980
--- /dev/null
+++ b/git-hooks/git_post_commit_hook
@@ -0,0 +1,19 @@
+#! /bin/sh
+# Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+#
+# Contact: Nokia Corporation <info@qt.nokia.com>
+#
+# You may use this file under the terms of the 3-clause BSD license.
+# See the file LICENSE from this package for details.
+#
+
+# Usage: in every repository you want to have checked:
+# cd .git/hooks
+# ln -s /path/to/git_post_commit_hook post-commit
+#
+
+sha1=${1-HEAD} # just for debugging
+GIT_PUSH=${GIT_PUSH+$GIT_PUSH,}wip # this check makes totally no sense locally
+export GIT_PUSH
+exec sanitize-commit $sha1 strict >&2