I'd like my remote repository to refuse any pushes that contains a file that contains a tab, but only if the file belongs in a certain class (based on the filename). Is that possible?
I have looked a bit at the update hook
in githooks, and I think that is the correct one.
So in short, a push should be rejected if:
- there is a file of the listed types (
*.cpp
,*.h
,CMakeLists.txt
) - that contains one or more tab characters.