Discover vcs in new-cmd only if --vcs not set
authorLukas Lueg <lukas.lueg@gmail.com>
Fri, 27 Oct 2017 13:00:23 +0000 (15:00 +0200)
committerLukas Lueg <lukas.lueg@gmail.com>
Fri, 27 Oct 2017 13:00:23 +0000 (15:00 +0200)
commit0c26596a84298ab491a201cf2466476e10f12a5f
treed27542feabd53a04c7960986fd655f40cd4fd07b
parente5562ddb061b8eb5a0e754d702f164a1d42d0a21
Discover vcs in new-cmd only if --vcs not set

If a commandline-argument is given, it takes precedence
over the config and existing vcs. Avoid trying to discover
existing repositories in that case, saving use from
shelling out to `hg`. Fixes #4327
src/cargo/ops/cargo_new.rs