I've started to see an error appearing when I navigate between branches in git branchless:
2024-05-22T18:25:56.228109Z ERROR git_branchless_hook: Could not parse reference-transaction-line err=
0: Could not parse OID from string ref:refs/heads/main
1: Git error GenericError: unable to parse OID - contains invalid characters
Location:
git-branchless-lib/src/git/repo.rs:289
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0: git_branchless_hook::reference_transaction::parse_reference_transaction_line with line="0000000000000000000000000000000000000000 ref:refs/heads/main HEAD"
at git-branchless-hook/src/lib.rs:289
1: git_branchless_hook::hook_reference_transaction with effects=<Output fancy=false> transaction_state="committed"
at git-branchless-hook/src/lib.rs:418
2: git_branchless_hook::command_main with ctx=CommandContext { effects: <Output fancy=false>, git_run_info: <GitRunInfo path_to_git="git" working_directory="/usr/local/google/home/jibbl/Projects/oak" env=not shown> } args=HookArgs { subcommand: ReferenceTransaction { transaction_state: "committed" } }
at git-branchless-hook/src/lib.rs:527
It seems that it somehow gets the value ref:refs/heads/main in a position where a commit hash is expected.
I'm still digging into this more, but figured I'd file a bug in case anyone else has any hunches about what might be happening.
So far, all I can say is that I can't find any entry in the SQLite db that contains ref:refs/heads/main in that position; so I'm not sure where that's being introduced.
It seems that it's related to the state of the repository; even when I check out a fresh copy of the repository, this is happening. It just started happening yesterday or today, so perhaps it's somehow related to some commit metadata?
Functionally, everything still seems to work OK (it still switches tot he branch, for example).
Description of the bug
I've started to see an error appearing when I navigate between branches in git branchless:
It seems that it somehow gets the value
ref:refs/heads/main
in a position where a commit hash is expected.I'm still digging into this more, but figured I'd file a bug in case anyone else has any hunches about what might be happening. So far, all I can say is that I can't find any entry in the SQLite db that contains
ref:refs/heads/main
in that position; so I'm not sure where that's being introduced.It seems that it's related to the state of the repository; even when I check out a fresh copy of the repository, this is happening. It just started happening yesterday or today, so perhaps it's somehow related to some commit metadata?
Functionally, everything still seems to work OK (it still switches tot he branch, for example).
Expected behavior
I expect the message not to appear.
Actual behavior
The message appears.
Version of
rustc
No response
Automated bug report
No response
Version of
git-branchless
0.8.0
Version of
git
2.45.1.288.patched (internal company version)