observing / pre-commit

Automatically installs a git pre-commit script in your git repository which runs your `npm test` on pre-commit
MIT License
1.88k stars 150 forks source link

Support for git repos as submodules #96

Closed faazshift closed 7 years ago

faazshift commented 7 years ago

If a git repo is setup as a submodule of another repo, .git is a file (rather than a directory) containing the path to the submodule's git directory within the parent repos .git directory. This PR just adds the ability, if .git is a file, to resolve the actual git directory and install/uninstall to the right location.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 95.413% when pulling eed11d472a9ecf756c508f059d115bcd90e013b8 on faazshift:master into f55b66b9c75b73a903f5b77c7c511a13e0c7edff on observing:master.

faazshift commented 7 years ago

Didn't look through the other PRs before doing this, but I see there were other abandoned attempts at submodule support.

faazshift commented 7 years ago

To follow-up on this, my change has now been tested across several platforms by several within my organization, and seems to work exactly as expected in all cases so far.

gCastl commented 7 years ago

LGTM 👍

3rd-Eden commented 7 years ago

@faazshift The other PR's were not merged because of cross platform issues.