-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
'switch' is crashing after updating the index #1363
Comments
So after further investigation, it might not have been the I was able to get things working again with the workaround stated in that bug, namely disable/unset the manyFiles config option, and then 'git checkout' some revision so that the index gets rebuilt. I'll leave this bug open, since it still seems like a bug that these options don't work with git branchless, even though I was able to get things working again. But I understand if the maintainers want to close this bug or merge it with the other bug, etc. P.S. - For anyone reading this, note that it's possible that the 'update-index' command also broke things. I can't be sure it didn't. P.P.S. - In my attempts to resolve things, I also uninstalled git branchless (including deleting the .git/branchless directory in my git repo) and then reinstalled it. It's vaguely possible that was part of getting things working again too. |
We rely on libgit2 to handle all index operations, so basically the only thing we can do is hope that libgit2 gains support for it, and then upgrade our dependency version. There might be something we can do to surface better error messages for a class of index errors, to suggest that users undo whatever index configuration changes they might have just made 😅. |
Now that libgit2 and the rust bindings have been updated to support |
Description of the bug
I recently ran
git update-index --index-version 4
On the recommendation of others in an attempt to speed up certain Git operations. Since running that, 'git branchless switch' is panicking:
Looking at the documentation on 'git update-index' apparently the default index version is ether 2 or 3, so I've tried to reset the index back to what it was via
git update-index --index-version 3
etc, but 'switch' is still crashing.Anyone have any idea what about my index 'git branchless' doesn't like, and how I could resolve it?
Expected behavior
'switch' should not crash
Actual behavior
'switch' crashes
Version of
rustc
rustc 1.78.0 (9b00956e5 2024-04-29)
Automated bug report
Software version
git-branchless 0.9.0
Operating system
macOS 14.5 (Darwin 23.5.0)
Command-line
Environment variables
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: 5562, transaction ID: 18545 (message: checkout)
RefUpdateEvent { timestamp: 1720025943.786314, event_tx_id: Id(18545), ref_name: ReferenceName("HEAD"), old_oid: 95c043fc89103c9fb962768ccf7f0a6fc703ea60, new_oid: 95c043fc89103c9fb962768ccf7f0a6fc703ea60, message: None }
Event ID: 5555, transaction ID: 18498 (message: branchless)
ObsoleteEvent { timestamp: 1720025582.30605, event_tx_id: Id(18498), commit_oid: NonZeroOid(afe4864333abfbc94bff0d70c4e986e3244221cd) }
ObsoleteEvent { timestamp: 1720025582.30605, event_tx_id: Id(18498), commit_oid: NonZeroOid(e282ab4f49927aa0175d296637d4d2c14337d743) }
ObsoleteEvent { timestamp: 1720025582.30605, event_tx_id: Id(18498), commit_oid: NonZeroOid(8c2149aa6e610413b873766f8e69fabcfb5cf0cf) }
RefUpdateEvent { timestamp: 1720025583.157356, event_tx_id: Id(18498), ref_name: ReferenceName("refs/heads/redacted-ref-14"), old_oid: afe4864333abfbc94bff0d70c4e986e3244221cd, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1720025583.157356, event_tx_id: Id(18498), ref_name: ReferenceName("refs/heads/redacted-ref-15"), old_oid: 8c2149aa6e610413b873766f8e69fabcfb5cf0cf, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1720025583.157356, event_tx_id: Id(18498), ref_name: ReferenceName("refs/heads/redacted-ref-16"), old_oid: 8c2149aa6e610413b873766f8e69fabcfb5cf0cf, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1720025583.157356, event_tx_id: Id(18498), ref_name: ReferenceName("refs/heads/redacted-ref-17"), old_oid: e282ab4f49927aa0175d296637d4d2c14337d743, new_oid: 0000000000000000000000000000000000000000, message: None }
Event ID: 5544, transaction ID: 18479 (message: branchless)
ObsoleteEvent { timestamp: 1720025496.389633, event_tx_id: Id(18479), commit_oid: NonZeroOid(2238a7277476657ac2ca605bdfdf8ee8c070528c) }
ObsoleteEvent { timestamp: 1720025496.389633, event_tx_id: Id(18479), commit_oid: NonZeroOid(829d0d2d234095c82322e82eccb8d88c25a12f79) }
ObsoleteEvent { timestamp: 1720025496.389633, event_tx_id: Id(18479), commit_oid: NonZeroOid(419f36e8a95e0c1c76f568df9ca922657168b47c) }
ObsoleteEvent { timestamp: 1720025496.389633, event_tx_id: Id(18479), commit_oid: NonZeroOid(46d75830e79ee27345356035b04123491eec8050) }
ObsoleteEvent { timestamp: 1720025496.389633, event_tx_id: Id(18479), commit_oid: NonZeroOid(317415e97c4a65f9ae94e20d6fbc2dff0757506b) }
RefUpdateEvent { timestamp: 1720025497.002267, event_tx_id: Id(18479), ref_name: ReferenceName("refs/heads/redacted-ref-18"), old_oid: 317415e97c4a65f9ae94e20d6fbc2dff0757506b, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1720025497.002267, event_tx_id: Id(18479), ref_name: ReferenceName("refs/heads/redacted-ref-19"), old_oid: 317415e97c4a65f9ae94e20d6fbc2dff0757506b, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1720025497.002267, event_tx_id: Id(18479), ref_name: ReferenceName("refs/heads/redacted-ref-20"), old_oid: 2238a7277476657ac2ca605bdfdf8ee8c070528c, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1720025497.002267, event_tx_id: Id(18479), ref_name: ReferenceName("refs/heads/redacted-ref-21"), old_oid: 419f36e8a95e0c1c76f568df9ca922657168b47c, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1720025497.002267, event_tx_id: Id(18479), ref_name: ReferenceName("refs/heads/redacted-ref-22"), old_oid: 829d0d2d234095c82322e82eccb8d88c25a12f79, new_oid: 0000000000000000000000000000000000000000, message: None }
RefUpdateEvent { timestamp: 1720025497.002267, event_tx_id: Id(18479), ref_name: ReferenceName("refs/heads/redacted-ref-23"), old_oid: 46d75830e79ee27345356035b04123491eec8050, new_oid: 0000000000000000000000000000000000000000, message: None }
Event ID: 5543, transaction ID: 18401 (message: hook-post-checkout)
RefUpdateEvent { timestamp: 1719946653.943282, event_tx_id: Id(18401), ref_name: ReferenceName("HEAD"), old_oid: 95c043fc89103c9fb962768ccf7f0a6fc703ea60, new_oid: 95c043fc89103c9fb962768ccf7f0a6fc703ea60, message: None }
Event ID: 5542, transaction ID: 18398 (message: reference-transaction)
RefUpdateEvent { timestamp: 1719946653.805619, event_tx_id: Id(18398), ref_name: ReferenceName("refs/heads/redacted-ref-4"), old_oid: 0000000000000000000000000000000000000000, new_oid: 95c043fc89103c9fb962768ccf7f0a6fc703ea60, message: None }
Version of
git-branchless
git-branchless-opts 0.9.0
Version of
git
git version 2.44.0
The text was updated successfully, but these errors were encountered: