-
-
Notifications
You must be signed in to change notification settings - Fork 937
BadObject on repo after git.gc() #61
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
It seems the repo didn't update its internal state, probably its a performance implementation of the (default) python backend. In any way, this is a bug that one might want to address indeed. |
With your current backend, you can also call
to read in the newly created packs. |
Ah, that workaround is good enough for me, thanks :) |
The repo.odb.update_cache() fix appears to only work if there were pack files present when the repo object was created. If only loose files were present when the repo object was created that repo object doesn't seem to pick up the new pack files when update_cache() is called. |
I acknowledge that. Apparently on initialization, it will add handlers for whichever storage type it finds, like loose objects, packs, or alternate info files. |
I have to consider this an issue that can't be fixed automatically, as the only solution would be to watch all commands issued through the Alternatives are as follows:
|
Example code:
Tested on GitPython 0.3.2.RC1
The text was updated successfully, but these errors were encountered: