flat-zoo-31952
08/04/2022, 9:23 PM./pants tailor --changed-since=HEAD
as a pre-commit check, and it's adding things for unstaged files... is there a way to spell the index in a --changed-diffspec=
so that this doesn't happen?hundreds-father-404
08/04/2022, 9:25 PMflat-zoo-31952
08/04/2022, 9:34 PM./pants --changed-diffspec=HEAD...<staged> tailor
I don't know if there's a way to express '<staged>' in spelling revisions thoughflat-zoo-31952
08/04/2022, 9:35 PMgit diff --cached --name-only --no-commit-id HEAD
flat-zoo-31952
08/04/2022, 9:37 PM--changed-since=HEAD
hundreds-father-404
08/04/2022, 9:37 PM./pants --spec-files=<(git diff-tree --cached --name-only --no-commit-id HEAD) list
. Although you may hit https://github.com/pantsbuild/pants/issues/5385 on bashflat-zoo-31952
08/04/2022, 9:37 PMlist
things it hasn't been told to pay attention to yethundreds-father-404
08/04/2022, 9:38 PMtailor
learned how to work on file arguments regardless of targets existing or not 🙂flat-zoo-31952
08/04/2022, 9:44 PMhundreds-father-404
08/04/2022, 9:45 PMit doesn't work for tailor specifically because pants wont list things it hasn't been told to pay attention to yetIn the code snippet, use
tailor
rather than list
. That should feed Pants a bunch of (possibly unowned) files, and it should know what to doflat-zoo-31952
08/04/2022, 9:48 PMflat-zoo-31952
08/04/2022, 9:54 PM