Sadly I think git hook managers remove the simplicity of the whole design. Understandably since no one reads manuals anymore and projects don’t mind tacking on yet another module/plugin, however easy.
[0]: https://github.com/jdx/mise
"scripts": {
"postinstall": "git config --local core.hooksPath etc/hooks"
},1. Link the scripts from the worktree to the .git/hooks directory - perhaps using a bootstrap script.
Ref: https://codeinthehole.com/tips/tips-for-using-a-git-pre-comm...
2. Declare the directory in the worktree to be the local git hooks directory.
Just put your hook logic in a script and copy it to the git hooks folder on startup as necessary -- and then, voila, you've avoided the nonsense of some well-intentioned package whose author thinks Rust in git hooks is a selling point rather than a head scratcher.
ln -sf ../../scripts/git-pre-commit-hook .git/hooks/pre-commit
which simply adds a pre-commit symlink to a script in the repo's scripts/ dir. But hooksPath seems better.