if we're not in a git repo. don't link commit hooks (fix #2141)