[PATCH 1/1] Short-circuiting hooks if repository is accessed directly