Open
Description
Problem
The progress bar won't appear when using libcurl as git2 backend.
Actually it's an issue ofgit2-curl
. git2-curl
calls curl_easy_perform
which is synchronous, so all calls of CurlSubtransport::read
are deferred until the whole response is fed into the memory.
Ref: #9395 (comment)
Steps
- Prepare a cargo project which needs to perform some git operation (e.g. git source dependency).
- Run
HTTP_TIMEOUT=5 cargo fetch
. - The progress bar disappears while transferring data via the network.
Possible Solution(s)
Modify git2-curl
int a streaming manner.
Notes
This issue is just for record. I'll send a PR to git2-rs after figuring out a reasonable way to perform a stream read.
Output of cargo version
:
cargo 1.51.0 (43b129a20 2021-03-16)
release: 1.51.0
commit-hash: 43b129a20fbf1ede0df411396ccf0c024bf34134
commit-date: 2021-03-16