the command below doesn't work, is there a way to ...
# general
a
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
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
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
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
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