-
Notifications
You must be signed in to change notification settings - Fork 157
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
irmin-git: fix decoding contents in the middle of a buffer #2277
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #2277 +/- ##
==========================================
+ Coverage 68.12% 68.14% +0.01%
==========================================
Files 133 133
Lines 15982 15983 +1
==========================================
+ Hits 10888 10891 +3
+ Misses 5094 5092 -2
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thanks, it looks good! ( |
We are now using a new function, `Raw.length_with_header`
8be0141
to
39d14fe
Compare
CHANGES: ### Added - **irmin-server** - Added `irmin-server` package (mirage/irmin#2031, @zshipko) - **irmin-client** - Added `irmin-client` package to connect to `irmin-server` instances (mirage/irmin#2031, @zshipko) - **irmin** - Add pretty printers for `Commit`, `Tree`, `Info`, `Status`, `Branch` when using `utop` (@metanivek, mirage/irmin#1839) ### Fixed - **irmin-pack** - Fix index integrity check for v3 stores (mirage/irmin#2267, @metanivek) ### Removed - **irmin-http** - Removed `irmin-http` since it is not compatible with generic keys. `irmin-grapqhl` or `irmin-server` should be used instead. (mirage/irmin#1902, @zshipko) - **irmin** - Removed stream proofs. We now only have Merkle tree proofs. This simplifies the maintenance of that part of the code, as ensuring the correct order of cached IO operations was tricky for stream proofs (mirage/irmin#2275, @samoht) ### Changed - **irmin-git** - Moved lower bounds to `git.3.14.0` to use new function (mirage/irmin#2277, @metanivek)
CHANGES: ### Added - **irmin-server** - Added `irmin-server` package (mirage/irmin#2031, @zshipko) - **irmin-client** - Added `irmin-client` package to connect to `irmin-server` instances (mirage/irmin#2031, @zshipko) - **irmin** - Add pretty printers for `Commit`, `Tree`, `Info`, `Status`, `Branch` when using `utop` (@metanivek, mirage/irmin#1839) ### Fixed - **irmin-pack** - Fix index integrity check for v3 stores (mirage/irmin#2267, @metanivek) ### Removed - **irmin-http** - Removed `irmin-http` since it is not compatible with generic keys. `irmin-grapqhl` or `irmin-server` should be used instead. (mirage/irmin#1902, @zshipko) - **irmin** - Removed stream proofs. We now only have Merkle tree proofs. This simplifies the maintenance of that part of the code, as ensuring the correct order of cached IO operations was tricky for stream proofs (mirage/irmin#2275, @samoht) ### Changed - **irmin-git** - Moved lower bounds to `git.3.14.0` to use new function (mirage/irmin#2277, @metanivek)
This code previously assumed that it could read to the end of the buffer, but this is not always the case. This issue was discovered while testing the new batch API in
irmin-client
.This PR updates
irmin-git
to useocaml-git
3.14.0 or newer. This release ofocaml-git
fixes the discovered bug and also exposes a function (length_with_header
) that can be used to know the length of buffer read. I also updated the client/server example to use an in-memory git store, which can be used to manually verify this fix.