Description of the bug
If core.hooksPath is a relative path, git branchless init always resolves it relative to the directory in which it was invoked, not relative to the root of the repo like how Git interprets it.
Reproduction:
git init
git config core.hooksPath hooks
mkdir foo
cd foo
git branchless init
ls
Expected behavior
Hooks should have been installed to /hooks in the repo
Actual behavior
Hooks are installed to /foo/hooks (and then ignored by git)
Version of rustc
No response
Automated bug report
No response
Version of git-branchless
git-branchless-opts 0.10.0
Version of git
git version 2.39.5 (Apple Git-154)
Description of the bug
If
core.hooksPathis a relative path,git branchless initalways resolves it relative to the directory in which it was invoked, not relative to the root of the repo like how Git interprets it.Reproduction:
git init git config core.hooksPath hooks mkdir foo cd foo git branchless init lsExpected behavior
Hooks should have been installed to
/hooksin the repoActual behavior
Hooks are installed to
/foo/hooks(and then ignored by git)Version of
rustcNo response
Automated bug report
No response
Version of
git-branchlessgit-branchless-opts 0.10.0
Version of
gitgit version 2.39.5 (Apple Git-154)