sx-git Phase 5: diff — Myers line diff + structural tree diff + unified render (TDD)

Myers O(ND) forward/backtrack over line vectors (dict-vec), edit script
{:op eq|del|add :line}, reconstruction invariants both sides, paper example
D=5 verified; unified hunks with context 3, merged ranges, exact header
math for empty sides; tree/commit structural diff over flattened trees;
whole-commit unified render. 27/27, total 159/159.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 12:15:51 +00:00
parent 125d9f1398
commit 4d5a60a754
5 changed files with 595 additions and 5 deletions

View File

@@ -8,4 +8,5 @@ _Generated by `lib/git/conformance.sh`_
| ref | 38 | 0 | 38 |
| dag | 30 | 0 | 30 |
| worktree | 26 | 0 | 26 |
| **Total** | **132** | **0** | **132** |
| diff | 27 | 0 | 27 |
| **Total** | **159** | **0** | **159** |