Skip to content

Commit

Permalink
Auto merge of #11931 - JohnTheCoolingFan:master, r=ehuss
Browse files Browse the repository at this point in the history
Fix typo in variable name

Just fixes a typo in a variable name (it was "vsces" instead of "vcses", derived from VCS, meaning Version Control System).
  • Loading branch information
bors committed Apr 4, 2023
2 parents 8e11d86 + 0cf3a22 commit 5a5c7e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cargo/ops/cargo_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,31 +514,31 @@ pub fn init(opts: &NewOptions, config: &Config) -> CargoResult<NewProjectKind> {
let mut version_control = opts.version_control;

if version_control == None {
let mut num_detected_vsces = 0;
let mut num_detected_vcses = 0;

if path.join(".git").exists() {
version_control = Some(VersionControl::Git);
num_detected_vsces += 1;
num_detected_vcses += 1;
}

if path.join(".hg").exists() {
version_control = Some(VersionControl::Hg);
num_detected_vsces += 1;
num_detected_vcses += 1;
}

if path.join(".pijul").exists() {
version_control = Some(VersionControl::Pijul);
num_detected_vsces += 1;
num_detected_vcses += 1;
}

if path.join(".fossil").exists() {
version_control = Some(VersionControl::Fossil);
num_detected_vsces += 1;
num_detected_vcses += 1;
}

// if none exists, maybe create git, like in `cargo new`

if num_detected_vsces > 1 {
if num_detected_vcses > 1 {
anyhow::bail!(
"more than one of .hg, .git, .pijul, .fossil configurations \
found and the ignore file can't be filled in as \
Expand Down

0 comments on commit 5a5c7e8

Please sign in to comment.