Auto merge of #4684 - matklad:lazy-update, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 31 Oct 2017 14:14:46 +0000 (14:14 +0000)
committerbors <bors@rust-lang.org>
Tue, 31 Oct 2017 14:14:46 +0000 (14:14 +0000)
commit7c9c15393eed939824a68240d6538e5e09202bae
treeae373fde96152ec92d1cb33f81b277dddd3d3ffa
parent7c33b5c146f4338e82ce4cc4681b6e45ab09288b
parent63d83e8ebd3ec864afed4fafedf1d37b0a9fce6c
Auto merge of #4684 - matklad:lazy-update, r=alexcrichton

Don't update lockfiles from previous Cargo versions if `--locked` is passed

Recently, we've stopped outputting `[root]` section to Cargo.lock files. The problem with this is that somebody might want to have a Cargo.lock file with a `[root]` section for compatibility with older Cargos, but at the same time use newer Cargo to build the crate. In this case, newer Cargo would remove `[root]` from the lockfile. Such updating of the lockfiles to the latest versions is a reasonable behavior, but it might be useful to be able to override it with `--locked` flag.

Context: https://github.com/rust-lang/cargo/issues/4563#issuecomment-340238773

r? @alexcrichton