files.get_diff
Show the unified diff of a file between two commit hashes, revealing exactly what changed. Use with earlier and later hashes to compare versions.
Instructions
Return the unified diff of one file between two commit hashes (typically obtained from files.get_history for the same file). Read-only; no side effects, auth, or rate limits. Order matters — commit_a is treated as the earlier side; reversing the args inverts the diff. Throws if either hash is unknown to the file's repo. Use after files.get_history to see WHAT changed, not just THAT it changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ID of the file | |
| commit_a | Yes | Earlier commit hash (from get_history) | |
| commit_b | Yes | Later commit hash (from get_history) |