Expand description
The shadow-branch renderer: the diff rewritten as a synthetic commit stack
on a refs/review/…/stack ref, one commit per group in reading order —
git log --oneline alone shows the shape of the change, and skim
remainders are skippable on their subject line.
Plumbing only (ADR 0011): temp index, hash-object, update-index, write-tree, commit-tree, update-ref. No checkout, no branch switch, no contact with the user’s worktree.
Every commit’s content is computed BY APPLYING HUNKS cumulatively — the
final tip tree equalling the head tree is therefore a real assertion that
every hunk was carried (invariant 3), backed by an independent per-commit
@@ recount (invariant 4). The exceptions are the same documented ones as
the core tree builder: zero-hunk files (binary, mode-only, empty) are
staged from recorded oids in a trailing [meta] commit.
Structs§
Functions§
- build_
stack - Build and land the stack. Errors (and leaves the ref untouched) if any stack invariant fails.