Compare two refs
compareSummarize changed files between two Git refs from their merge base, showing per-file status and line counts without returning patches.
Instructions
Summarise what changed on to since it split from from — git diff <merge-base> <to> — as one row per file: git's status letter (A, M, D, R091 old -> new) and ± counts, or binary. The merge_base is printed, so which diff ran is never hidden; merge_base: false asks for the raw two-dot diff instead, and when the two refs share no history the two-dot diff runs with merge_base="none". This never returns a patch — a branch diff is unbounded — so the file list is capped by max_files and a capped answer says so. Use diff_file for one file's patch, passing a printed merge_base as from for the branch view of it. path is a git pathspec, and it narrows rename detection with it: a rename can then appear as a delete and an add. Both refs are resolved before the diff and both commits are stated in the result, with synced_at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The ref to compare to — whose changes are summarised, e.g. 'fix/PROJ-7608'. | |
| from | Yes | The ref to compare from — what the split is measured from, e.g. 'develop' or a commit sha. | |
| path | No | A git pathspec to narrow the comparison, e.g. 'src/'. Note that it narrows rename detection too. | |
| project | No | GitLab project path, e.g. 'group/subgroup/repo'. Defaults to GITLAB_DEFAULT_PROJECT. | |
| max_files | No | Maximum changed files to list (default 100). Totals still cover every file; a capped answer says so. | |
| merge_base | No | Diff from the merge base of the two refs (default true). Set false for the raw two-dot diff — 'what would applying this do'. |