I am trying to create a git server hook so that unformatted code would not be pushed. In my scenario I want to use clang format to check if the code is formatted correctly. if not the user will receive a message stating they need to format the code before pushing. 

we are trying to implement a must format policy at work and this will simply be a safety net.