Expand description
Commit-boundary file snapshots and the pure line diff over them — what
lets the generated page re-diff any contiguous commit sub-range without
touching git: the CLI collects contents once, the page (via WASM) calls
range_diff with a pair of boundary indices.
Nothing here shells out; snapshots arrive as data. Renames are not re-detected inside a sub-range — a rename shows as a delete plus an add.
Structs§
- Boundary
- The tracked files’ state at one commit boundary.
- Range
Snapshots - File contents pinned at every commit boundary of the diffed range, deduplicated by git blob id. Only paths touched by some commit in the range are tracked.
Functions§
- diff_
lines - Diff two texts line-wise into hunks with
contextunchanged lines around each change — the sameHunk/Lineshapesparse_unified_diffproduces. Identical texts yield no hunks. - range_
diff - The diff between boundaries
fromandto(from < to, indices intoboundaries), as the sameFileDiffshape the build-time parser emits. Selecting commitkalone isrange_diff(snap, k - 1, k, …).