Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ignore all target dirs #150

Merged
merged 2 commits into from
Jul 5, 2019
Merged

chore: ignore all target dirs #150

merged 2 commits into from
Jul 5, 2019

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Jul 5, 2019

Motivation

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.

Solution

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]

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]>
@hawkw hawkw self-assigned this Jul 5, 2019
@jonhoo
Copy link
Contributor

jonhoo commented Jul 5, 2019

I may be misremembering, but can't you replace both those patterns with just target/?

@hawkw
Copy link
Member Author

hawkw commented Jul 5, 2019

I may be misremembering, but can't you replace both those patterns with just target/?

IIRC that matches only top-level target/ dirs? let me double-check.

Edit: nevermind, yeah, that works. Changed it!

Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw merged commit f771996 into master Jul 5, 2019
@hawkw hawkw deleted the eliza/fix-gitignore branch July 5, 2019 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants