Force-delete a branch. Use only once review state confirms it landed: a
squash merge leaves the commits non-ancestry-merged, so git branch -d
would refuse even though the work is in.
A unified-0 diff against HEAD: just the staged changes when cached,
otherwise all tracked changes (staged and unstaged). Zero context lines
so each hunk’s pre-image range pinpoints exactly the lines it touches.
Resolve path under the repo’s common git dir, which all linked
worktrees share, rather than the per-worktree dir git_path returns. Use
this for state that guards or mirrors the shared config (branch.*), so
every worktree of a repo agrees on one file.
Rebase only the commits after base, replaying base..branch onto
parent. Used when the recorded fork point is known so commits that
landed upstream by squash or rebase are not replayed.
Store content as a single-file commit and point reference at it, so the
data rides along a normal ref push. Orphan each time: the ref just moves to
the new commit (callers force-push it, as it is regenerable).