Is it possible to get diff for only one file using the github API?

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.

+4
source share
1 answer

Unable to execute current version (3) of the GitHub API.

, ( , List path), , /.

+1

Source: https://habr.com/ru/post/1543320/


All Articles