summaryrefslogtreecommitdiff
path: root/tools/pre-commit
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pre-commit')
-rwxr-xr-xtools/pre-commit6
1 files changed, 6 insertions, 0 deletions
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