]> git.proxmox.com Git - cargo.git/commitdiff
Auto merge of #11044 - Eh2406:file_hash, r=weihanglo
authorbors <bors@rust-lang.org>
Thu, 8 Sep 2022 01:14:07 +0000 (01:14 +0000)
committerbors <bors@rust-lang.org>
Thu, 8 Sep 2022 01:14:07 +0000 (01:14 +0000)
Cache index files based on contents hash

Since #10507 Cargo has known how to read registry cached files whose index version starts with the hash of the file contents. Git makes it very cheap to determine the hash of a file. This PR switches cargo to start writing the new format.

Cargoes from before #10507 will not know how to read, and therefore overwrite, cached files written by Cargos after this PR.

Cargos after this PR can still read, and will consider up-to-date cached files written by all older Cargos.

As I'm writing this out I'm thinking that there may not be any point in writing a file that has both. An alternative implementation just writes the file contents hash. ðŸ¤”


Trivial merge