compare_commits
Compare two Git commits to analyze code changes, identify when bugs were introduced, and generate changelogs by examining file modifications and diff content.
Instructions
Compare two commits and return the diff.
This tool generates a detailed comparison between two points in the history (from_commit -> to_commit).
It's useful for:
Reviewing changes between versions.
Debugging when a bug was introduced.
Generating a changelog.
The output includes a summary of file changes (added, modified, deleted, renamed) and the actual diff content for each file.
Args: repo_path: The absolute path to the repository. from_commit: The source (older) commit SHA. to_commit: The target (newer) commit SHA.
Returns: A JSON-formatted string containing the list of changed files, additions/deletions counts, and diff patches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | ||
| from_commit | Yes | ||
| to_commit | Yes |