From f771996118663b8aa86f850b13daf4900a8e10c6 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Fri, 5 Jul 2019 14:43:01 -0700 Subject: [PATCH] chore: ignore all target dirs (#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 --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 85cd8d4ec8..724f2bfa82 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,7 @@ Temporary Items ### Rust ### # Generated by Cargo # will have compiled files and executables -/target/ -/*/target/ +target/ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html