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

core.hooksPath not resolved from repository root #1438

Open
ethanwu10 opened this issue Nov 5, 2024 · 1 comment · May be fixed by #1446
Open

core.hooksPath not resolved from repository root #1438

ethanwu10 opened this issue Nov 5, 2024 · 1 comment · May be fixed by #1446
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ethanwu10
Copy link

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)

@ethanwu10 ethanwu10 added the bug Something isn't working label Nov 5, 2024
@arxanas arxanas added the good first issue Good for newcomers label Nov 5, 2024
@arxanas
Copy link
Owner

arxanas commented Nov 5, 2024

Thanks for reporting. I think many git-branchless commands haven't been tested in non-root directories (and actually don't work), and so far it hasn't come up often (at least on the issue tracker).

@ethanwu10 ethanwu10 linked a pull request Nov 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants