I'm currently using gitolite, and in my post-receive hook I'm pushing to a (local) mirror if any incoming commits are on master.
Thing is, that mirror only exists because I want to automate deployment & testing on pushes to master: I can't get at the index files in the work.git
, so I push to a non-bare work
repo to get a working tree, and run a completely separate post-receive hook.
I have two problems with this approach:
- It feels dumb
- If tests fail I get emails notifying me, instead of a rejected commit. (Not actually that big of a problem in terms of frequency, I just don't like it.)
What's the standard way of dealing with this?