Stub out hook manager when hooks are disabled in tests
Gitaly has a GITALY_TESTING_NO_GIT_HOOKS
environment variable
to disable git hooks during tests. Currently, it only skips configuring
the interal API client but leaves the hook manager in place. This causes
nil pointer dereferencing panics when executing code that would invoke
hooks when the environment variable is set.
This commit fixes the problem by stubbing out the whole hook manager when the environment variable is set.
This also default enables UserCommitFiles
again as the problem with the tests has been fixed.
Edited by Sami Hiltunen