DiffFile
Shape
- 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
Example
Synthesized example{
"additions": 47,
"collapsed": false,
"deletions": 63,
"generated": false,
"is_binary": false,
"patch_truncated": false,
"path": "path-bff6",
"status": "added",
"collapse_reason": "generated",
"old_path": "old-path-6b19",
"patch": "patch-5289"
}
Graph
Used inside
Contains
No named schema inside.
Used by
Sent by 0 operations
No operation takes it as a request body.
Returned by 4 operations
- GETGet diff for a commit/repositories/{repo_id}/commits/{commit_ref}/diff
- GETGet a page of the diff between two commits/repositories/{repo_id}/diff
- GETFetch a single file's diff on demand, force-expanded/repositories/{repo_id}/diff-file
- GETGet diff for a merge request/repositories/{repo_id}/merge-requests/{mr_id}/diff