Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getClosestGitPath does not work in git submodules #42

Closed
niklas-sparfeld opened this issue Apr 3, 2017 · 1 comment
Closed

getClosestGitPath does not work in git submodules #42

niklas-sparfeld opened this issue Apr 3, 2017 · 1 comment

Comments

@niklas-sparfeld
Copy link

niklas-sparfeld commented Apr 3, 2017

In git submodules .git is a file pointing to the "real" git-dir instead of a directory.

The current implementation of getClosestGitPath does not take this case into account and the githooks --install command fails.

One possible solution is to use git rev-parse --git-dir to get the git directory for the cwd. I implemented that solution naively in my fork: https://github.com/Kampfgnom/git-hooks-js

The problem is: The tests expect a broken implementation and no longer pass with the given solution.

In the context of my current project I do not have the time to investigate any further and fix the issue, which is why I am posting my fork "as is".

@tarmolov
Copy link
Owner

tarmolov commented Apr 7, 2018

See #48

@tarmolov tarmolov closed this as completed Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants