Reference
crab diff
Show content differences between file versions.
Synopsis
crab diff [OPTIONS] <REF1> [REF2] [-- <PATHS>...]Description
crab diff compares Crab-tracked files between two Git refs using file-index
and shard metadata. It reports changed chunks, affected bytes, and reuse
without downloading full file content.
For conceptual background, see Comparing Changes.
Arguments
| Argument | Required | Description |
|---|---|---|
REF1 | Yes | First Git ref, such as a branch, tag, SHA, or HEAD~N |
REF2 | No | Second Git ref; defaults to HEAD |
PATHS | No | Paths after -- to restrict the comparison |
Options
| Option | Default | Description |
|---|---|---|
--stat | false | Show summary-only output |
--name-only | false | List only changed file names |
--verbose | false | Show per-segment detail |
--byte-ranges | false | Show changed byte offset ranges |
--no-color | false | Disable colored output |
--no-annotations | false | Disable format-aware annotations |
--json | false | Emit structured JSON output |
Examples
Diff all changed files
crab diff HEAD~1 HEADDiff a specific file
crab diff HEAD~1 HEAD -- models/weights.binSummary only
crab diff --stat HEAD~1 HEADRelated Commands
crab status— see which files have changes.crab add— stage changes.