Skip to content

Commit f771996

Browse files
authored
chore: ignore all target dirs (tokio-rs#150)
* chore: ignore all target dirs The gitignore for this repository currently includes the pattern `/*/target`, which will ignore all directories named `target` that are nested up to one directory deep from the root. This ignores the target dir for the workspace, and any generated by builds on individual workspace crates. However, the `tracing` crate contains test crates which cannot be part of the workspace, due to setting feature flags. These crates are inside the `tracing` crate's subdirectory, so the `target` dirs generated by running these tests are nested _two_ levels deep. Git doesn't know to ignore the generated files from the test dirs, which is kind of annoying. This branch changes the ignore pattern to `/**/target`, which should ignore _all_ subdirectories named `target`. This does have the potential downside that if any crate adds a module called `target`, we'd have to update the gitignore, but I'm not _too_ concerned currently. Signed-off-by: Eliza Weisman <[email protected]>
1 parent 0e02d6d commit f771996

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ Temporary Items
3232
### Rust ###
3333
# Generated by Cargo
3434
# will have compiled files and executables
35-
/target/
36-
/*/target/
35+
target/
3736

3837
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
3938
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

0 commit comments

Comments
 (0)