-
-
Notifications
You must be signed in to change notification settings - Fork 932
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
Blob object's data stream incomplete for certain files #220
Comments
I may have an idea what's causing this, and will try to look into it today. Using the gitfs-test repository, I should be able to reproduce the issue right away. Will let you know about details once I have them. |
the issue described in gitpython-developers/GitPython#220 See test notes for proper usage, it all depends on a useful dataset with high entropy
The issue seems to be fixed with the release of gitdb 0.6.1 . Even though I put the file in question into the test-suite to assert the fix and added a few more checks to possibly find more issues of this kind, I wasn't able to find another file that showed the issue. My guess is that high-entropy loose object files are causing it. The fix consists of setting the decompression buffer of the compressed loose object from 512B to 8196B, which is the same value git was using at the time I implemented it. Please verify the issue is gone on your end as well - in the meanwhile I will see if I can find another fix that relies more on the understanding of the matter, instead of some zlib inner workings. |
Fantastic, I should be able to test this by the end of the week. |
Great - if you have access to repositories with plenty of binary data in it, you should be able to test for the error using this test. The The memory database will do exactly what a loose object database does, except that it only writes to and reads from memory, and I have just verified it truly spots the issue with the file you provided with the previous patch removed. In ShortTo test your repository in its entirety, set an environment variable to the repository and run a particular test using nose. export GITDB_TEST_GIT_REPO_BASE=myrepo/.git
nosetests gitdb/test/performance/test_pack.py -m test_loose_correctness |
I was able to confirm the fix. BTW, I noticed that pypi had not been updated with a tar archive for 0.6.1, so if you were waiting for a confirmation on the fix, you should be good to push the source to pypi now. |
Thank you ! It's gitdb that was updated, not git-python. Also I am hoping pip will automatically check for updates in dependent packages when users try to update git-python. |
Yes, I'm aware of this. There is no source link for 0.6.1, and when browsing the index on pypi there is no tar archive for 0.6.1: https://pypi.python.org/packages/source/g/gitdb/ |
Ouch, that hurts ! What was I thinking ? "Nothing" would probably be an acceptable answer ! Finally, the source exists, thanks again for letting me know so persistently :) ! |
Haha, no problem. Thanks again for the quick fix. |
Note that the .deb package's data stream is not the correct size (221818 instead of 222318 as it should be).
This doesn't seem to be related to the file size, as a larger PNG image works just fine. Both the PNG images and the .deb package are marked as binary files in the .gitattributes file, as well.
The text was updated successfully, but these errors were encountered: