Skip to content

avc diff

Shows added, modified, and deleted files between two snapshots, with line-level counts and unified diff previews.

Terminal window
avc diff snap-abc123 snap-def456
avc diff snap-abc123 snap-def456 --json
ArgumentRequiredDescription
<from_id>yesOlder snapshot ID
<to_id>yesNewer snapshot ID
{
"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

AVC reads both snapshots’ file lists and builds a per-path comparison:

OldNewType
✓ (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.

  • avc diff-current — compare a snapshot to the working tree instead of another snapshot