Skip to content

🐛 Knip fails in a git worktree + lefthook #990

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

Open
6 tasks done
VanTanev opened this issue Mar 18, 2025 · 0 comments · May be fixed by #991
Open
6 tasks done

🐛 Knip fails in a git worktree + lefthook #990

VanTanev opened this issue Mar 18, 2025 · 0 comments · May be fixed by #991
Labels
bug Something isn't working

Comments

@VanTanev
Copy link

Prerequisites

Reproduction url

https://github.com/VanTanev/knip-lefthook-bug-reproduction

Reproduction access

  • I've made sure the reproduction is publicly accessible

Description of the issue

Reproduction is kind of tedious, because it requires cloning the repo and then creating a git worktree branch checkout.

The issue is that Knip assumes the hooks directory is always .git/hooks, but that is not the case. In a worktree checkout, .git is not a folder but instead a pointer to the real folder.

@VanTanev VanTanev added the bug Something isn't working label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant