We are wondering if there is an api to get the two dot diff from two commits.
Solved! Solved! Go to Solution.
Thanks for the reply. We read the documentation and find it cannot solve our problem.
Here is an example:
We want to compare two commits with sha
4eff613a6c96579d11dad72e63200b74afc39433 and 2b58c5f5c142588b7b944f3b79a0371378da3db6
Which is the same as three dot diff on:
but we wonder if we can get this through API
Thank you for taking the time to write back with more information. Unfortunately, there's no way to do that with the GitHub REST API -- you can't pick which information will be returned. One option would be to pull each commit via the API or Git and then do a two-dot diff locally.
I hope this helps!
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!
@AndreaGriffiths11 is it accurate to say there's no way with the API (or with a single request) to get the actual diff of a forced push (i.e. compare old head with new head)?
Surprised to see that go unanswered.
Edit: I had added an additional question which also went unanswered so I'll answer it myself. I asked:
On the web, is there a way to diff this by version and all of .27 to .28?
... or with expand=1
@chrisdothtmldid you come up with any alternatives to get the actual diff of a forced push? That was exactly my use case as well, and I can't find a good way to do it (without an order of magnitude increase in API calls)