On Apr 13, 2013, at 09:43, Richard Cavell wrote: > I apologize in advance for not being able to figure this out. What exactly > is the difference between the pre-commit hook and the start-commit hook?
The start-commit hook is executed before the client has transmitted the revision content to the server. The pre-commit hook is executed after the client has transmitted the revision content to the server but before it has been accepted by the server. The post-commit hook is executed after the revision has been accepted by the server. So, if you just want to reject a commit based on user credentials, use start-commit. If you want to reject a commit based on the contents of the incoming revision, use pre-commit. And if you want to notify people of a successful commit, use post-commit. > Also, am I right in thinking that all I have to do to "install" such a hook > is to write a script, or modify the existing template, and then rename it as > the same name without the ".tmpl"? And make sure it has the execute bit. > (Or on Windows, add ".bat" or ".exe")