-
-
Notifications
You must be signed in to change notification settings - Fork 933
git.base.IndexFile.iter_blobs crashes after executing git update-index --skip-worktree <some_file>
- unsupported git index version
#1075
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
Comments
FYI, if I run python with |
git update-index --skip-worktree <some_file>
git update-index --skip-worktree <some_file>
- unsupported git index version
It seems like Using the I am leaving this issue open as it might be worth investigating if GitPython does indeed silently corrupt index files written with a newer version, or whether it somehow manages to not discard any data that it previously decoded. If so, the assertion could possibly be relaxed. |
I just hit this issue while update vim plugins for nixpkgs. The repo seems to be fine after the assertion failure and I would really like to get a patch for this rather sooner than later. |
This can also be triggered via I just ran into this while working on the Fedora git package. The package maintainer tooling (rpkg/fedpkg) uses GitPython. |
Yes, indeed GitPython cannot read V3 index files which add support for extended attributes. The 'intend-to-add' flag is the second of the bunch. Adding support for it is definitely doable as reading such extended indices involves checking for a bit to trigger reading another two bytes, which are then added to the decoded flags. |
I am using git 2.41.0. This did though:
|
Somewhat related, git/git@9213563f0a adds a That may result in more tools using features from and/or expecting support for index version 4 in the not-too-distant future. I would love to be able to submit patches to support index version 3 and 4, but I'm unlikely to muster the amount of time and/or skill needed to do that anytime soon. |
I was about to suggest to look at |
Hi.
I've encountered
AssertionError
while callinggit.base.IndexFile.iter_blobs
aftergit update-index --skip-worktree <some_file>
like below.It's not an urgent issue for me because after
git update-index --no-skip-worktree
it works without any problems, but if you have spare time can you please support git index withskip-worktree
?The text was updated successfully, but these errors were encountered: