-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
git checkout --orphan
causes hook to panic
#1455
Comments
Thanks for reporting. git-branchless supports orphaning/unborn branches in some places, namely here: git-branchless/git-branchless-lib/src/git/repo.rs Lines 311 to 337 in b5a6bfd
It looks like the spantrace you provided calls git-branchless/git-branchless-hook/src/lib.rs Lines 212 to 226 in b5a6bfd
which calls git-branchless/git-branchless-lib/src/git/repo.rs Lines 701 to 711 in b5a6bfd
In those cases, the reference is "not found" (according to libgit2?), which I guess is technically correct at some level, but it's meaningfully different if In this case, the best solution might be to have Unfortunately, that might also be a bit of a hack, in the sense that |
Description of the bug
When running
git checkout --orphan <branch-name
, the Git hook git-branchless installs panicsFull Log
Expected behavior
A clean checkout of my new branch
Actual behavior
The hook panicked
Version of
rustc
No response
Automated bug report
Software version
git-branchless 0.10.0
Operating system
Linux 5.15.167.4-microsoft-standard-WSL2
Command-line
Environment variables
Git version
Hooks
Hooks directory:
/home/seth/git-branchless-repro/.git/hooks
Show 7 hooks
Hook
post-applypatch
Hook
post-checkout
Hook
post-commit
Hook
post-merge
Hook
post-rewrite
Hook
pre-auto-gc
Hook
reference-transaction
Events
Show 5 events
Event ID: 1, transaction ID: 4 (message: hook-post-checkout)
RefUpdateEvent { timestamp: 1732840114.4923446, event_tx_id: Id(4), ref_name: ReferenceName("HEAD"), old_oid: e9d3ae555b94ec97055ba4f29edd419cbbbb395c, new_oid: e9d3ae555b94ec97055ba4f29edd419cbbbb395c, message: None }
There are no previous available events.
There are no previous available events.
There are no previous available events.
There are no previous available events.
Version of
git-branchless
No response
Version of
git
No response
The text was updated successfully, but these errors were encountered: