<#5682 Support nested .gitignore files in --pants-...
# github-notifications
c
#5682 Support nested .gitignore files in --pants-ignore-use-gitignore Issue created by stuhood The
--pants-ignore
option causes pants to ignore files and directories: it uses the same syntax as
.gitignore
because it is implemented using the ignore crate. The ignore crate also supports consuming
.gitignore
files from disk, but we're currently not using that support. This ticket would deal with adding a pants level option next to
--pants-ignore
that would enable using the
.gitignore
file in addition to the explicit patterns in
--pants-ignore
. If the
.gitignore
file patterns were applied first, this would allow for maximum generality: with that option enabled,
--pants-ignore
would be a superset of
.gitignore
, but because negation syntax is supported, you could negate patterns in
--pants-ignore
if you wanted them ignored by git, but not by pants.
--pants-ignore
is declared here: pants/src/python/pants/option/global_options.py Lines 127 to 131 in </pantsbuild/pants/commit/2d4e61753d3896ee969ba239cb0a66c36d781f84|2d4e617> and ends up being used here: pants/src/rust/engine/fs/src/lib.rs Lines 388 to 393 in </pantsbuild/pants/commit/2d4e61753d3896ee969ba239cb0a66c36d781f84|2d4e617> pantsbuild/pants