git_diff
Show differences between the working tree, index, and commits to review changes before staging or committing, or to compare two commits.
Instructions
Show differences between the working tree, the index, and commits. Defaults to a diffstat summary; pass stat=False for the full diff. Use this to review what a change actually contains before staging or committing, to compare two commits with source and target, or to check what would be committed with staged=True. Best for: reviewing changes before staging or committing. Returns: 'Diff output:' followed by the diff, or 'No changes'; stat=True shows a summary only. Does NOT show file status or history — use git_status for the file list and git_log for commits; use git_show to see one commit's full patch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stat | No | Show a diffstat summary (default True); pass False for the full diff | |
| source | No | Commit or ref to diff from | |
| staged | No | Show staged changes | |
| target | No | Commit or ref to diff against | |
| repo_path | No | Path to the git repository, defaults to '.' (the server working directory) | . |