Skip to content
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

Fix raw parsing in middle of buffer #623

Merged
merged 1 commit into from
Aug 27, 2023

Conversation

metanivek
Copy link
Member

Address issue with of_raw_with_header assuming it could read until the end of a given buffer and add a new function, length_with_header, that clients can use to inspect length read.

I ran into this while working on testing irmin-server. Its protocol (de)serializes blobs in the middle of a buffer, which does not work when using an irmin-git store. I have verified that this patch (with appropriate changes in irmin-git) fixes the issue for us.

Address issue with `of_raw_with_header` assuming it could read until the
end of a given buffer and add a new function, `length_with_header`, that
clients can use to inspect length read.
@dinosaure
Copy link
Member

Seems good, thanks for your work, I will try to cut a release as soon as I can.

@dinosaure dinosaure merged commit 138b789 into mirage:main Aug 27, 2023
1 check passed
@metanivek metanivek deleted the improve_raw_decode branch August 28, 2023 14:00
dinosaure added a commit to dinosaure/opam-repository that referenced this pull request Sep 30, 2023
CHANGES:

- Fix tests with `git.2.41.0+` (@metanivek, mirage/ocaml-git#622)
- Fix raw parsing in the middle of the buffer (@metanivek, mirage/ocaml-git#623)
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

- Fix tests with `git.2.41.0+` (@metanivek, mirage/ocaml-git#622)
- Fix raw parsing in the middle of the buffer (@metanivek, mirage/ocaml-git#623)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants