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

odb: fix OdbReader read return value #1061

Merged
merged 2 commits into from
Jun 25, 2024
Merged

Conversation

gensmusic
Copy link
Contributor

git_odb_stream_read return the number of bytes read.

This should be a typo, and will cuase Read.read_to_end to read for ever since it will continuously call read to append more data to buf until read returns either Ok(0)
or an error of non-ErrorKind::Interrupted kind.

 git_odb_stream_read return the number of bytes read.
@ehuss
Copy link
Contributor

ehuss commented Jun 22, 2024

Thanks! I believe this is correct, but the libgit2 docs say it returns 0. I believe the docs are incorrect, so I opened libgit2/libgit2#6837 just to verify.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like upstream got merged. Thanks!

@ehuss ehuss enabled auto-merge June 25, 2024 15:21
@ehuss ehuss added this pull request to the merge queue Jun 25, 2024
Merged via the queue into rust-lang:master with commit f1f09ce Jun 25, 2024
7 checks passed
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.

None yet

2 participants