StackDiffResponse
The cumulative diff a stacked merge request's whole downstack chain would
produce once merged — the net change from the stack base up to the anchor's
source tip, exactly what merge-stack on the same anchor applies.
Shape
- anchor_mr_idMergeRequestId (integer · int64)The merge request the diff is anchored on (top of the rolled-up chain).
- base_branchBranchName (string)The stack base — the bottom-most target branch the diff is taken against.
diffDiffResponseThree-dot cumulative diff
merge_base(base_branch, anchor_source) … anchor_source.diff.base_shais that merge base, not the base tip.- The DiffResponse schema
- base_shaCommitHash (string)
filesarray of DiffFile
- The DiffFile schema
- additionsinteger0–∞
- collapsedbooleanThe patch was intentionally withheld (generated or oversized) to save bytes but is fetchable in full on demand via
GET .../diff-file. Only ever set when patches were requested (include_patch=true). - deletionsinteger0–∞
- generatedbooleanDetected generated/lock/minified file. Always computed from the path, independent of
collapsed, so a client can badge or auto-fold it. - is_binaryboolean
- patch_truncatedbooleanThe patch exceeds the hard per-file size cap and is omitted. Unlike
collapsed, this file is not expandable in place — a client reads it piece-by-piece viaGET .../file-linesinstead. - pathstring
- statusDiffFileStatusaddedmodifieddeletedrenamedcopied
- collapse_reasonCollapseReasongeneratedlargeor nulloptionalWhy a file's patch body was withheld from a
DiffFile(seecollapsed). Distinct frompatch_truncated, which marks a patch too large to ever send; acollapsedfile's patch is fetchable on demand viaGET .../diff-file. - old_pathstring or nulloptional
- patchstring or nulloptional
- has_morebooleanAnother page follows this one.
- head_shaCommitHash (string)
- pageinteger0–∞The page returned, from 0.
statsDiffStats
- The DiffStats schema
- additionsinteger0–∞Lines added across the whole change.
- deletionsinteger0–∞Lines deleted across the whole change.
- files_changedinteger0–∞Every file the change touches.
- total_filesinteger0–∞How many files the pages can reach — every changed file, unless
truncated. - truncatedbooleanThe change touches more files than any page can reach.
statsstill counts all of them.
- member_mr_idsarray of MergeRequestId (integer · int64)The downstack merge requests rolled into this diff, base-first (the anchor is last).
- repository_idRepositoryId (string · uuid)
Example
Synthesized example{
"anchor_mr_id": 42,
"base_branch": "fix/payload-build-pin",
"diff": {
"base_sha": "9e6b4d21a83c36455885bbc7189dc6b86711990f",
"files": [
{
"additions": 89,
"collapsed": false,
"deletions": 5,
"generated": false,
"is_binary": false,
"patch_truncated": false,
"path": "path-6787",
"status": "added"
}
],
"has_more": false,
"head_sha": "7017273e7c8b8649af65aa75bea3e14e71d55e75",
"page": 21,
"stats": {
"additions": 58,
"deletions": 38,
"files_changed": 67
},
"total_files": 3,
"truncated": false
},
"member_mr_ids": [
42,
42
],
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70"
}
Graph
Used inside
No schema contains this one.
Contains
Used by
Sent by 0 operations
No operation takes it as a request body.
Returned by 1 operation