diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-03-06 04:12:01 -0600 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-05-15 13:19:25 +0200 |
commit | 4efc0b81cba20de5b4420c0dcebdbb85b98e3686 (patch) | |
tree | 67e6900fb198dfeb0800e2ebff228e2ad9b033a9 | |
parent | 9ecc734f631ce4597782b17b071752b8fa223d49 (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
Signed-off-by: Petr Mladek <pmladek@suse.cz>
-rwxr-xr-x | git-hooks/commit-msg | 6 |
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 |