git-hooks/commit-msg | 6 ++++++ 1 file changed, 6 insertions(+) New commits: commit 04b2736ac9da3421a7999489dc0c8752c36e775c Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Tue Mar 6 04:12:01 2012 -0600
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 diff --git a/git-hooks/commit-msg b/git-hooks/commit-msg index 6257213..378acfa 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 _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits