Skip to content
GitmoapAPIBeta
Schema

DiffFilesResponse

Every file a change touches, without patches, in path order — the response of GET .../diff-files. Keyed on the same base/head as a batch diff, so the list and any page of that diff describe one snapshot.

Shape

  • base_shaCommitHash (string)
  • filesarray of DiffFileSummary
    • The DiffFileSummary schema
    • additionsinteger0–∞
    • deletionsinteger0–∞
    • generatedbooleanLooks generated — a lock file, a minified bundle, a snapshot — judged from the path. A page read with patches also honours the repository's .gitattributes.
    • is_binarybooleanA binary file: it has no line counts and no patch.
    • pathstring
    • statusDiffFileStatusaddedmodifieddeletedrenamedcopied
    • old_pathstring or nulloptionalThe file's previous path, for a rename or copy. Pass it as old_path when reading the file's own diff, or a renamed file reads as the whole file added.
  • head_shaCommitHash (string)
  • 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.
  • truncatedbooleanThe change touches more files than are listed. stats still counts all of them.

Example

Synthesized example
{
"base_sha": "4658f9ea6efec4017b6bbcd367303483ab43d3a3",
"files": [
{
"additions": 12,
"deletions": 47,
"generated": false,
"is_binary": false,
"path": "path-42c6",
"status": "added"
}
],
"head_sha": "de551999c1e83d2a9d2d7713ee5de0c2d6977be4",
"stats": {
"additions": 60,
"deletions": 26,
"files_changed": 11
},
"truncated": false
}

Graph

Used inside

No schema contains this one.

Used by

Sent by 0 operations

No operation takes it as a request body.