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

fix(init): resolve hooks path relative to repo root #1446

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ethanwu10
Copy link

@ethanwu10 ethanwu10 commented Nov 15, 2024

Ensure that core.hooksPath is resolved relative to the repository root of the main worktree, or the git dir if it is bare (git itself uses the same logic for bare repos).

Fixes #1438

@ethanwu10
Copy link
Author

I'm not clear on which worktree core.hooksPath is being read from and where it's supposed to be resolved relative to. If I'm reading the git docs correctly, they should be read from the current worktree regardless of which worktree the config value itself was read from. I'll need to figure out how to test this properly.

Ensure that `core.hooksPath` is resolved relative to the repository root
of the current worktree, or the git dir if it is bare. This should be
the same logic as git uses for resolution.
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

Successfully merging this pull request may close these issues.

core.hooksPath not resolved from repository root
1 participant