]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #11068 - arlosi:progress, r=epage
authorbors <bors@rust-lang.org>
Fri, 9 Sep 2022 21:31:22 +0000 (21:31 +0000)
committerbors <bors@rust-lang.org>
Fri, 9 Sep 2022 21:31:22 +0000 (21:31 +0000)
Change progress indicator for sparse registries

The progress indicator for sparse registries previously could go backwards as new dependencies are discovered, which confused users.

The new indicator looks like this:
```
    Updating crates.io index
       Fetch [====================>            ] 46 complete; 29 pending
```

The progress bar percentage is based the current depth in the dependency tree, with a hard coded limit at `10/11`. This provides natural feeling progress for many projects that I tested.

`complete` represents the number of index files downloaded, `pending` represents the number of index files that Cargo knows need to be downloaded but have not yet finished.

Fixes #10820


Trivial merge