diff --git a/book/08-customizing-git/sections/hooks.asc b/book/08-customizing-git/sections/hooks.asc index a0140c019..68cf42349 100644 --- a/book/08-customizing-git/sections/hooks.asc +++ b/book/08-customizing-git/sections/hooks.asc @@ -111,6 +111,16 @@ The first script to run when handling a push from a client is `pre-receive`. It takes a list of references that are being pushed from stdin; if it exits non-zero, none of them are accepted. You can use this hook to do things like make sure none of the updated references are non-fast-forwards, or to do access control for all the refs and files they're modifying with the push. +===== `proc-receive` + +The `proc-receive` script is quite different from other server-side scripts. +It is invoked by git push process, but can change the worklow or process between `pre-receive` and `post-receive` script. +If the incoming update references match the specified reference pattern (`receive.procReceiveRefs`), then `proc-receive` will take over the whole flow after `pre-receive`. +It can decide to create, update or rename new reference, or even fall back to previous process. + +In other words, it can outsource reference processing flow. +This gives a system administrator the ability to customize a pushing workflow, like that used in a Gerritt project. + ===== `update` The `update` script is very similar to the `pre-receive` script, except that it's run once for each branch the pusher is trying to update.