-
-
Notifications
You must be signed in to change notification settings - Fork 88
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 v2.40.0 crashing with "could not read index: invalid data in index - calculated checksum does not match expected" #894
Comments
Hi @mlanln, sorry to hear that this is happening. Another user also reported this on Discord, but unfortunately we were unable to find a solution; they ended up recloning the repo. My assumption is that this is a bug in libgit2, but I'm not sure. |
Darn, I was hoping it was fixable. I get the same error on a newly |
@mlanln can you try with a version of Git earlier than 2.40? Maybe something about the index format changed and libgit2 hasn't upgraded to handle it yet. |
Bingo! I downgraded to |
@mlanln Thanks for confirming. I'll leave the issue open in case others run into the same problem. I also very recently updated our version of |
I'm still seeing this error with git v2.40.0 with f25babf. Here's me trying to
|
It looks like it's this issue in libgit2: libgit2/libgit2#6531 You can follow the workaround here:
I expect we'll have to wait for libgit2 to fix it and for the changes to propagate downstream. |
Bonus note: you may not be setting |
This has been fixed in libgit2/libgit2#6738, so it should be in the next release of libgit2 (1.7.3 or later). |
Looks like the fix for this was released with libgit2 v1.8.0 (released 3 weeks ago): https://github.com/libgit2/libgit2/releases/tag/v1.8.0 Now this is blocked on the rust bindings: |
I think this is unblocked now? rust-lang/git2-rs#1032 was released in https://github.com/rust-lang/git2-rs/releases/tag/git2-0.19.0. |
FYI this PR bumped git2 to 0.19.0 which includes the fix for this issue: You can install from git using |
Description of the bug
I am trying out
git-branchless
in a repo at work.git sl
works fine but write commands likegit record
,git amend
, andgit reword
crash.Expected behavior
No error
Actual behavior
Error
Version of
rustc
rustc 1.65.0
Automated bug report
Software version
git-branchless 0.7.0
Operating system
Linux 5.15.0-1031-gcp
Command-line
Environment variables
SHELL=/bin/bash EDITOR='code -w'
Git version
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: 24, transaction ID: 21 (message: hook-post-checkout)
RefUpdateEvent { timestamp: 1681181943.1674395, event_tx_id: EventTransactionId(21), ref_name: ReferenceName("HEAD"), old_oid: 3900bee7374c2fa4318d0b30056db8ac147c0408, new_oid: 3900bee7374c2fa4318d0b30056db8ac147c0408, message: None }
Event ID: 23, transaction ID: 20 (message: reference-transaction)
RefUpdateEvent { timestamp: 1681181943.1404214, event_tx_id: EventTransactionId(20), ref_name: ReferenceName("refs/heads/redacted-ref-1"), old_oid: 0000000000000000000000000000000000000000, new_oid: 3900bee7374c2fa4318d0b30056db8ac147c0408, message: None }
Event ID: 22, transaction ID: 19 (message: hook-post-rewrite)
RewriteEvent { timestamp: 1681164709.6778862, event_tx_id: EventTransactionId(19), old_commit_oid: 89b215533a6ef3787065f6471f7b6ceacd6de0e8, new_commit_oid: 3900bee7374c2fa4318d0b30056db8ac147c0408 }
Event ID: 21, transaction ID: 18 (message: post-commit)
CommitEvent { timestamp: 1681164705.0, event_tx_id: EventTransactionId(18), commit_oid: NonZeroOid(3900bee7374c2fa4318d0b30056db8ac147c0408) }
Event ID: 19, transaction ID: 17 (message: reference-transaction)
RefUpdateEvent { timestamp: 1681164709.6239216, event_tx_id: EventTransactionId(17), ref_name: ReferenceName("HEAD"), old_oid: 89b215533a6ef3787065f6471f7b6ceacd6de0e8, new_oid: 3900bee7374c2fa4318d0b30056db8ac147c0408, message: None }
RefUpdateEvent { timestamp: 1681164709.6239216, event_tx_id: EventTransactionId(17), ref_name: ReferenceName("refs/heads/redacted-ref-2"), old_oid: 89b215533a6ef3787065f6471f7b6ceacd6de0e8, new_oid: 3900bee7374c2fa4318d0b30056db8ac147c0408, message: None }
Version of
git-branchless
No response
Version of
git
No response
The text was updated successfully, but these errors were encountered: