---
title: "BranchDiff"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.gitpando.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Pando API

## Fields

- `BranchDiff.base_branch` (string, required)
- `BranchDiff.base` (string, required) — Main's head the diff was taken against; for a branch Pando merged at this head, main just before that merge (the merge commit's first parent), so a merged branch keeps its changes.
- `BranchDiff.head` (string, required) — The branch's head.
- `BranchDiff.merge_base` (string, required)
- `BranchDiff.truncated` (boolean, required) — Some patches were left out past 2 MiB in all (`patch_omitted: budget`).
- `BranchDiff.too_many_files` (boolean, required) — More than 1
- `BranchDiff.files_total` (integer, required) — Every changed file
- `BranchDiff.stats` (object, required) — The listed files.
  - `BranchDiff.stats.files` (integer, optional)
  - `BranchDiff.stats.additions` (integer, optional)
  - `BranchDiff.stats.deletions` (integer, optional)
- `BranchDiff.files` (array<unknown>, required)
  - `BranchDiff.files.path` (string, required)
  - `BranchDiff.files.status` (string, required)
    - one of `"added"`, `"modified"`, `"deleted"`, `"renamed"`
  - `BranchDiff.files.binary` (boolean, required)
  - `BranchDiff.files.patch` (string | null, required) — This file's unified patch in git's format; null when `patch_omitted` is set.
  - `BranchDiff.files.old_path` (string, optional) — Only for `renamed`.
  - `BranchDiff.files.old_sha` (string | null, optional)
  - `BranchDiff.files.new_sha` (string | null, optional)
  - `BranchDiff.files.old_mode` (string | null, optional)
  - `BranchDiff.files.new_mode` (string | null, optional)
  - `BranchDiff.files.additions` (integer | null, optional)
  - `BranchDiff.files.deletions` (integer | null, optional)
  - `BranchDiff.files.hunks` (array<object>, optional) — Only with `hunks=1`.
    - `BranchDiff.files.hunks.old_start` (integer, required)
    - `BranchDiff.files.hunks.old_lines` (integer, required)
    - `BranchDiff.files.hunks.new_start` (integer, required)
    - `BranchDiff.files.hunks.new_lines` (integer, required)
    - `BranchDiff.files.hunks.lines` (array<string>, required) — Each line starts with `+`, `-`, ` `, or `\` (no newline at end of file).
  - `BranchDiff.files.patch_omitted` (string, optional)
    - one of `"binary"`, `"too_large"`, `"budget"`


Source: https://docs.gitpando.com/api/schemas/BranchDiff/index.md
