From 324f46460683255d0fa6a7b08210ca8fe7f2c398 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Mar 2009 21:27:19 -0400 Subject: pre-commit runs check only on master, and uses tg --- tools/pre-commit | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/pre-commit') diff --git a/tools/pre-commit b/tools/pre-commit index 57ba0854..dfe2cc87 100755 --- a/tools/pre-commit +++ b/tools/pre-commit @@ -1,5 +1,11 @@ #!/bin/sh +"$(tg --hooks-path)"/pre-commit "$@" || exit $? + +if [ ! $(git rev-parse --symbolic-full-name HEAD) = refs/heads/master ]; then + exit 0 +fi + # These are the locations I keep my temporary source and build trees in TMPDIR=$HOME/Products/ledger-pre-commit MIRROR=$HOME/Products/ledger-pre-commit-mirror -- cgit v1.2.3