diff --git a/src/cargo/ops/cargo_new.rs b/src/cargo/ops/cargo_new.rs index 8fc52b4c6bf..c0d751d38e4 100644 --- a/src/cargo/ops/cargo_new.rs +++ b/src/cargo/ops/cargo_new.rs @@ -404,7 +404,7 @@ fn mk(config: &Config, opts: &MkOptions) -> CargoResult<()> { let name = opts.name; let cfg = global_config(config)?; // Please ensure that ignore and hgignore are in sync. - let ignore = ["\n", "/target/\n", "**/*.rs.bk\n", + let ignore = ["\n", "/target\n", "**/*.rs.bk\n", if !opts.bin { "Cargo.lock\n" } else { "" }] .concat(); // Mercurial glob ignores can't be rooted, so just sticking a 'syntax: glob' at the top of the