Open ethanwu10 opened 1 week ago
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.
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.
I agree with that interpretation of the docs: a relative hook path always needs to be interpreted from the worktree root that the hook is running in (which means that there's not a way to specify a hook path that's relative to the main worktree).
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