Git server hook: get contents of files being pushed?
问题 I am trying to enforce some coding rules in my team. To that end, I've written a number of client-side hooks, which work all right, but now I want the same checks to run when a developer pushes their modifications to the central repository. But they don't work. Here is what I want to do: I want to traverse the pushed files line by line, check for coding conventions violations and if I find any, reject the push, also showing the line numbers + violations. In my pre-commit client side hook I