Input validation for Git hooks
Starting with !2824 (merged), we started validating some parameters of a hook invocation. Most notably, it assured that the environment contained some required variables like GL_ID and GL_PROTOCOL. What this MR didn't do though was to verify inputs of the hook which are typically passed by git itself.
This is now being done in this second MR.
Implements #3255 (closed)