https://pantsbuild.org/ logo
m

mysterious-motherboard-97366

06/01/2022, 11:24 PM
Is it possible to configure
./pants tailor
,
./pants test ::
, etc to only operate on files tracked in Git?
1
h

happy-kitchen-89482

06/01/2022, 11:28 PM
Hmm, they should already ignore everything configured by (
pants_ignore
)[https://www.pantsbuild.org/docs/reference-global#section-pants-ignore] which includes everything covered by gitignore by default (see https://www.pantsbuild.org/docs/reference-global#section-pants-ignore-use-gitignore)
Are you seeing otherwise?
Oh, and is this due to nested .gitignore files? IIRC we don't handle those at the moment
m

mysterious-motherboard-97366

06/01/2022, 11:29 PM
I mean files outside .gitignore that haven’t been staged or committed. If you run
git status
, they show up under
Untracked files:
h

hundreds-father-404

06/01/2022, 11:33 PM
there's no way to do this atm. It would require a specific
--no-changed-untracked
option. Would you be interested in adding that?
m

mysterious-motherboard-97366

06/01/2022, 11:38 PM
Hmm, I think running
git stash --include-untracked
first would be a good way to do it without specific support in Pants
👍 2
h

happy-kitchen-89482

06/02/2022, 6:20 AM
If that's acceptable for your workflow then yep!