sx-git Phase 4: worktree — tree materialization, index overlay, status (TDD)

Worktree is a value (path->data dict). tree-from-files/tree-files round-trip
through real tree objects (cid-identical to hand-built trees); index =
{:base tree-cid :staged overlay} in kv with add!/rm!/unstage!/index-tree!;
status = three-way dict diff (HEAD vs index vs worktree) with
staged/unstaged/untracked. 26/26, total 132/132.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 12:11:04 +00:00
parent eda6806989
commit 125d9f1398
5 changed files with 495 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ if [ ! -x "$SX_SERVER" ]; then
exit 1
fi
SUITES=(object ref dag)
SUITES=(object ref dag worktree)
OUT_JSON="lib/git/scoreboard.json"
OUT_MD="lib/git/scoreboard.md"
@@ -45,6 +45,7 @@ run_suite() {
(load "lib/git/object.sx")
(load "lib/git/ref.sx")
(load "lib/git/dag.sx")
(load "lib/git/worktree.sx")
(epoch 2)
(eval "(define git-test-pass 0)")
(eval "(define git-test-fail 0)")