summaryrefslogtreecommitdiff
path: root/tools/pre-commit
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-03-05 21:27:19 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-03-05 21:27:19 -0400
commit324f46460683255d0fa6a7b08210ca8fe7f2c398 (patch)
tree745627eb667033ab8c607daefcbf260d2bd2fd1d /tools/pre-commit
parentd3c93b73cb4bbc496c8b1f89d19c5c180fc38659 (diff)
downloadfork-ledger-324f46460683255d0fa6a7b08210ca8fe7f2c398.tar.gz
fork-ledger-324f46460683255d0fa6a7b08210ca8fe7f2c398.tar.bz2
fork-ledger-324f46460683255d0fa6a7b08210ca8fe7f2c398.zip
pre-commit runs check only on master, and uses tg
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