gitlab_compare_refs
Compare GitLab branches, tags, or commits to view differences in commit lists, file changes, and diff stats. Simplifies reviewing updates before merging or creating merge requests.
Instructions
Compare two refs (branches/tags/commits) to see differences. Returns commit list, diff stats, and file changes. Useful for reviewing changes before merging or creating MRs.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
from_ref | Yes | Source ref for comparison (string, required). Branch name, tag, or commit SHA to compare from | |
project_id | No | Project ID (integer) or path (string like 'group/project'). Optional - auto-detects from current git repository if not provided | |
straight | No | Use straight diff instead of three-dot (boolean). True = direct diff, False = merge-base diff. Default: false | |
to_ref | Yes | Target ref for comparison (string, required). Branch name, tag, or commit SHA to compare to |