Skip to content

Updating crates.io index with net.git-fetch-with-cli option enabled should show progress #11574

Closed
@kawaemon

Description

Problem

If user doesn't use net.git-fetch-with-cli option, cargo shows the progress bar.
However it doesn't show anything and stalls up to some minutes (at least looks like so) with that option enabled.

It may make users feel anxious, so I think it should show progress somehow too.

❯ cargo add tokio
    Updating crates.io index
       Fetch [                         ]   2.28%, 258.75KiB/s

❯ CARGO_NET_GIT_FETCH_WITH_CLI=true cargo add tokio
    Updating crates.io index

Proposed Solution

I think redirecting git's stdout to user is reasonable solution.

It is the best if we could parse git's output and show the progress bar used in normal fetch, but it might be too expensive to implement.

Notes

No response

Metadata

Assignees

Labels

A-console-outputArea: Terminal output, colors, progress bar, etc.A-gitArea: anything dealing with gitC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-easyExperience: Easy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions