Skip to content

Commit 63f6d82

Browse files
committed
chore: fix target in generated hg ignore file
1 parent 4a3c588 commit 63f6d82

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: src/cargo/ops/cargo_new.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ fn mk(config: &Config, opts: &MkOptions<'_>) -> CargoResult<()> {
742742
// Using the push method with multiple arguments ensures that the entries
743743
// for all mutually-incompatible VCS in terms of syntax are in sync.
744744
let mut ignore = IgnoreList::new();
745-
ignore.push("/target", "^target/", "target");
745+
ignore.push("/target", "^target$", "target");
746746
if !opts.bin {
747747
ignore.push("/Cargo.lock", "^Cargo.lock$", "Cargo.lock");
748748
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
^target/
1+
^target$
22
^Cargo.lock$

Diff for: tests/testsuite/init/simple_hg/out/.hgignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
^target/
1+
^target$
22
^Cargo.lock$

Diff for: tests/testsuite/init/simple_hg_ignore_exists/out/.hgignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
# Added by cargo
44

5-
^target/
5+
^target$
66
^Cargo.lock$

0 commit comments

Comments
 (0)