Diff & Comparison
2 tools for comparing commits using unified diffs and per-file statistics.
bb_get_diff
Section titled “bb_get_diff”Get a unified diff between two commits or refs — shows all changes as a standard patch format.
| Parameter | Required | Description |
|---|---|---|
workspace | ✅ | Workspace slug |
repo_slug | ✅ | Repository slug |
spec | ✅ | Single commit hash (diffs against parent) or commit1..commit2 |
context | No | Number of context lines around changes |
path | No | Filter diff to a single file path |
ignore_whitespace | No | Ignore whitespace changes |
topic | No | When true with two-commit spec, produces a 3-dot diff (source vs merge-base) |
Example prompt:
“Show the diff between commits abc123 and def456”
bb_get_diffstat
Section titled “bb_get_diffstat”Get per-file change statistics between two commits — shows lines added/removed and the type of change for each file (added, modified, removed).
| Parameter | Required | Description |
|---|---|---|
workspace | ✅ | Workspace slug |
repo_slug | ✅ | Repository slug |
spec | ✅ | Single commit hash (diffs against parent) or commit1..commit2 |
path | No | Filter diffstat to a single file path |
ignore_whitespace | No | Ignore whitespace changes |
topic | No | When true with two-commit spec, produces a 3-dot diff (source vs merge-base) |
Example prompt:
“How many files changed between abc123 and def456?”