observing/pre-commit

Doesn't find git root when inside a submodule

Opened this issue · 0 comments

No hooks are installed when the repo has been cloned as a submodule. In this case, the .git file is plain text pointing to a directory under the parent .git/modules/....

I see code to handle this case, but it is unreachable because the condition here triggers first: https://github.com/observing/pre-commit/blob/master/install.js#L26