I have my cfengine (2 and 3) files in a git repository fronted by gitolite.
Users of this repo have a pre-commit hook that will perform syntax/promise checks on the files as needed. This works fine.
To protect against someone not having the pre-commit hook, I would like to add a hook in the bare repository on the gitolite server. I know I need to use a pre-receive or update.secondary hook. Beyond that, I'm stumped.
I've found a number of sites with instructions on doing this with PHP fies, but those can be checked individually, but to my (admittedly limited) understanding of cfengine I need all the cfengine files before I can check them.
Short of having the hook clone the repo, how do I go about doing this?