Skip to content

Commit 087bc40

Browse files
committed
new: use .{git,hg}ignore syntax that's also understood by Mercurial
1 parent 453ae9f commit 087bc40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cargo/ops/cargo_new.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ fn existing_vcs_repo(path: &Path) -> bool {
6464
fn mk(config: &Config, path: &Path, name: &str,
6565
opts: &NewOptions) -> CargoResult<()> {
6666
let cfg = try!(global_config(config));
67-
let mut ignore = "/target\n".to_string();
67+
let mut ignore = "target\n".to_string();
6868
let in_existing_vcs_repo = existing_vcs_repo(&path.dir_path());
6969
if !opts.bin {
70-
ignore.push_str("/Cargo.lock\n");
70+
ignore.push_str("Cargo.lock\n");
7171
}
7272

7373
let vcs = match (opts.version_control, cfg.version_control, in_existing_vcs_repo) {

0 commit comments

Comments
 (0)