get_commit
Retrieve commit details, author, stats, changed files, and selective diffs from GitLab; filter by file to prevent token blowout on large commits.
Instructions
Get commit details, author info, stats, changed file list, and selective file diffs
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sha | Yes | Commit SHA or short commit hash to inspect | |
| file_path | No | Filter diffs to only this specific file (prevents token blowout on large multi-file commits) | |
| with_diff | Yes | If true, includes file diffs for the commit | |
| project_id | Yes | Project numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically. | |
| max_diff_lines | Yes | Maximum lines of diff text to return per file (default: 500) |