diff options
| author | Jez Ng | 2012-07-26 03:53:34 -0700 | 
|---|---|---|
| committer | Jez Ng | 2012-07-26 03:56:05 -0700 | 
| commit | 492c920082d31749aec5b201802e47d0e90263e7 (patch) | |
| tree | 82e144513936d24a6ab76252bb8696386b5ac285 /git_hooks | |
| parent | e124536b675be48937c373bcf602b11e02ab87f8 (diff) | |
| download | vimium-492c920082d31749aec5b201802e47d0e90263e7.tar.bz2 | |
Git hacking: Set up pre-commit test hook.
Also tweak .gitignore.
To activate the hook, symlink .git/hooks to git_hooks.
Diffstat (limited to 'git_hooks')
| -rwxr-xr-x | git_hooks/pre-commit | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/git_hooks/pre-commit b/git_hooks/pre-commit new file mode 100755 index 00000000..4c618746 --- /dev/null +++ b/git_hooks/pre-commit @@ -0,0 +1,18 @@ +#!/bin/sh + +TDIR=`mktemp -d -t vimium` + +if [ $? -ne 0 ] +then +  exit 1 +fi + +git checkout-index --prefix=$TDIR/ -af + +cake test + +TEST_RESULT=$? + +rm -rf $TDIR + +exit $TEST_RESULT | 
