summaryrefslogtreecommitdiff
path: root/git-hooks
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-03-06 04:12:01 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-03-06 04:12:42 -0600
commit04b2736ac9da3421a7999489dc0c8752c36e775c (patch)
tree7c60c57febec2f71a1597dc19d2507d446600ce2 /git-hooks
parentc779054865431d32709dc8321bf063c0470f840e (diff)
call the gerrit commit-msg hook if present
This a a prep-work for if and when we use gerrit it is very important to call gerrit's commit-msg hook and the sooner we teach our own hook to play nice with it the less likely we will have issue during migration
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks/commit-msg6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-hooks/commit-msg b/git-hooks/commit-msg
index 62572138578b..378acfa00c57 100755
--- a/git-hooks/commit-msg
+++ b/git-hooks/commit-msg
@@ -14,6 +14,8 @@
# This example catches duplicate Signed-off-by lines.
+base_dir=$(dirname $0)
+
abort() {
cp $1 $1.save
cat >&2 <<EOF
@@ -59,4 +61,8 @@ if [ -n "`grep '^[[:space:]]\+\*.*:' $1`" -a -z "`grep '^\*' $1`" ] ; then
abort "$1" "Please don't use whitespace in front of '* file: Description.' entries."
fi
+if [ -f "${base_dir}/gerrit-commit-msg" ] ; then
+ source "${base_dir}/gerrit-commit-msg"
+fi
+
exit 0