Skip to content
New issue

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

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

Already on GitHub? # to your account

Support git worktree in nbdev_install_hooks #1246

Open
alex-rozenshteyn-leapyear opened this issue Dec 20, 2022 · 0 comments
Open

Support git worktree in nbdev_install_hooks #1246

alex-rozenshteyn-leapyear opened this issue Dec 20, 2022 · 0 comments

Comments

@alex-rozenshteyn-leapyear

When running nbdev_install_hooks, I get

NotADirectoryError: [Errno 20] Not a directory: '<path>/dir1/.git/hooks'

This makes sense, because I'm using git's worktrees:

% cat .git
gitdir: <path>/dir2/.git/worktrees/dir1

If I understand correctly, the issue is here, where the code assumes that the .git directory is $(git rev-parse --show-toplevel)/.git; instead, it should ask git directly via git rev-parse --git-dir.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant