https://pantsbuild.org/ logo
#general
Title
# general
a

acceptable-guitar-79854

10/25/2020, 2:04 PM
the command below doesn't work, is there a way to say "run on the diff between the previous commit and this one"?
Copy code
./pants --changed-since=HEAD~1 ...
f

flat-zoo-31952

10/25/2020, 3:56 PM
what version are you using? for me
Copy code
./pants --changed-since=HEAD~1 list
works fine to lists files/targets that have changed since the last commit
h

hundreds-father-404

10/25/2020, 5:23 PM
Same,
./pants --changed-since=HEAD~1 list
is working for me. You may also be interested in
--changed-diffspec
. From `./pants help changed`:
Calculate changes contained within a given Git spec (commit range/SHA/ref).
I.e.,
./pants --changed-diffspec=my_branch list
will show all files touched, independent of what current commit you’re on.
a

acceptable-guitar-79854

10/25/2020, 7:02 PM
Thak you @hundreds-father-404 and @flat-zoo-31952 I asked a dumb question, I forgot that my Jenkins was configured to do a shallow clone tracking just the last commit (so HEAD~1 doesn't exist)
f

flat-zoo-31952

10/25/2020, 7:05 PM
No that's actually a good thing to watch out for... I was gonna set up my CI to do the same thing this week, so thanks for giving me a heads up
👍 2