News for hackers. Stuff that matters.
Re:Setting up pre-commit tests with Git by exDM69 on Sunday December 08, 2013 @11:19AM (#6870070)
Wouldn't it be a lot better choice to make this a post-receive hook on your Git server? E.g. run the tests before code gets accepted to master.

I often intentionally commit code that doesn't work (pass tests or even compile), but not to master branch. One of the big advantages of Git is that you can share code with your team mates even if that code doesn't work yet.

Re:Setting up pre-commit tests with Git by merqumab on Sunday December 08, 2013 @11:36AM (#6870128)
You could always set the script to only run the tests on certain branches on pre-commit. (i.e. if branch name is not master, exit 0)