Skip to content

Commit

Permalink
chore: fix target in generated hg ignore file
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Mar 15, 2023
1 parent 4a3c588 commit bf37bb5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ fn mk(config: &Config, opts: &MkOptions<'_>) -> CargoResult<()> {
// Using the push method with multiple arguments ensures that the entries
// for all mutually-incompatible VCS in terms of syntax are in sync.
let mut ignore = IgnoreList::new();
ignore.push("/target", "^target/", "target");
ignore.push("/target", "^target", "target");
if !opts.bin {
ignore.push("/Cargo.lock", "^Cargo.lock$", "Cargo.lock");
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/mercurial_autodetect/out/.hgignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
^target/
^target
^Cargo.lock$
2 changes: 1 addition & 1 deletion tests/testsuite/init/simple_hg/out/.hgignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
^target/
^target
^Cargo.lock$
2 changes: 1 addition & 1 deletion tests/testsuite/init/simple_hg_ignore_exists/out/.hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# Added by cargo

^target/
^target
^Cargo.lock$

0 comments on commit bf37bb5

Please sign in to comment.