diff
Compare changes between commits, branches, or files in a Git repository. Identify modifications, track file statuses, and generate diff stats for version control analysis.
Instructions
Show differences between commits, branches, files.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
from | No | Source commit, branch, or tag (defaults to working directory) | |
nameOnly | No | Show only names of changed files (--name-only) | |
nameStatus | No | Show names and status of changed files (--name-status) | |
pathspec | No | Limit diff to specific paths | |
repoPath | Yes | Absolute path to the git repository | |
staged | No | Show staged changes (--cached) | |
stat | No | Show diffstat (--stat) | |
to | No | Target commit, branch, or tag (defaults to HEAD) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"from": {
"description": "Source commit, branch, or tag (defaults to working directory)",
"type": "string"
},
"nameOnly": {
"description": "Show only names of changed files (--name-only)",
"type": "boolean"
},
"nameStatus": {
"description": "Show names and status of changed files (--name-status)",
"type": "boolean"
},
"pathspec": {
"description": "Limit diff to specific paths",
"items": {
"type": "string"
},
"type": "array"
},
"repoPath": {
"description": "Absolute path to the git repository",
"type": "string"
},
"staged": {
"description": "Show staged changes (--cached)",
"type": "boolean"
},
"stat": {
"description": "Show diffstat (--stat)",
"type": "boolean"
},
"to": {
"description": "Target commit, branch, or tag (defaults to HEAD)",
"type": "string"
}
},
"required": [
"repoPath"
],
"type": "object"
}