Closed hkrutzer closed 1 month ago
Your prompt says master
after you cd into the new directory, but I don't see a git init
in your repro steps; is it missing?
Sorry, I ran git branchless init
twice, the second time with RUST_BACKTRACE. I removed the first time for brevity and must have accidentally removed git init as well. But it is supposed to be there.
I wasn't able to reproduce this.
GIT_TEMPLATE_DIR='' git init
and retrying still created the hooks
directory and contents correctly.git config --type path core.hooksPath
for you? The output above suggests that it might be /dev/null
, which would not be a valid directory to put hooks in.I opened https://github.com/arxanas/git-branchless/pull/1331 to include that information in the bug-report
output.
What is the value of git config --type path core.hooksPath for you? The output above suggests that it might be /dev/null, which would not be a valid directory to put hooks in.
Oops, I totally forgot I did that 🙂. That was indeed the problem. I should have seen that from the logs. Feel free this to close this issue (maybe you want to change the error message to say more but I don't think people often change core.hooksPath
).
maybe you want to change the error message to say more
I don't have time to adjust it right now, but I'm happy to accept a PR if you want to improve the message 🙂. Closing this issue for now (after having retitled it).
Description of the bug
(I've replaced the path to my homedir with
~
)Expected behavior
No response
Actual behavior
No response
Version of
rustc
rustc 1.78.0 (9b00956e5 2024-04-29)
Automated bug report
Software version
git-branchless 0.9.0
Operating system
macOS 13.6.7 (Darwin 22.6.0)
Command-line
Environment variables
Git version
Hooks
Error: Not a directory (os error 20)
Events
Error: Could not find repository main branch
Version of
git-branchless
git-branchless-opts 0.9.0
Version of
git
git version 2.45.0