Using the github API to compare the endpoint , I can request a unified diff between two commits:
curl -H 'Accept: application/vnd.github.3.diff' \
'https://api.github.com/repos/danvk/dygraphs/compare/01275da4...335011f'
Using the git command line tool, I can filter this diff for just one file:
git diff 01275da4..335011f dygraph.js
Is there a way to do this using the github API? I understand that I can filter to this difference as a post-processing step, but this can lead to API limitations if diff contains a large file in addition to a small file.
source
share