title: Git pre-receive hook to check config
body: <p>Id like to set a pre-receive hook in our git server that checks a config file and discards the push if it's invalid (I want to check presence of certain tokens depending on branch name). But I've seen preceive hook just receives a list of (old-rev, new-rev, refname) and the only way I've found to inspect file contents is diffing those references, which is not very confortable.</p>
  
  <p>Is there an easy way to do this?
  With a precommit hook it would be easier but I'd like to have a last barrier in the server.</p>