avc diff
Shows added, modified, and deleted files between two snapshots, with line-level counts and unified diff previews.
avc diff snap-abc123 snap-def456avc diff snap-abc123 snap-def456 --jsonArguments
Section titled “Arguments”| Argument | Required | Description |
|---|---|---|
<from_id> | yes | Older snapshot ID |
<to_id> | yes | Newer snapshot ID |
JSON output
Section titled “JSON output”{ "from_snapshot": "snap-abc123", "to_snapshot": "snap-def456", "files": [ { "path": "src/auth.go", "type": "modified", "old_hash": "abc...", "new_hash": "def...", "lines_added": 5, "lines_removed": 2, "diff_preview": "+func NewAuth() Auth {\n+ return &authImpl{}\n" }, { "path": "src/old.go", "type": "deleted", "old_hash": "ghi...", "lines_added": 0, "lines_removed": 45 } ]}Change types: added · modified · deleted
How it works
Section titled “How it works”AVC reads both snapshots’ file lists and builds a per-path comparison:
| Old | New | Type |
|---|---|---|
| ✓ | ✓ (same hash) | (skipped — no change) |
| ✓ | ✓ (different hash) | modified |
| ✗ | ✓ | added |
| ✓ | ✗ | deleted |
For each changed file, the unified diff is generated from the stored object blobs using an LCS (longest common subsequence) algorithm.
See also
Section titled “See also”avc diff-current— compare a snapshot to the working tree instead of another snapshot