Expand description
Git backend.
add_workspace:git worktree add --detach <ws> <base|commit>, then forCheckout::Patches, apply each patch bottom-to-top withgit apply --index --3wayand commit it.update_workspace:git checkout --detachonto the new base, then re-apply patches. Everyadd_workspace/update_workspacecall pins its resulting head underrefs/review-queue/<name>/<version>(git update-ref, never overwritten), so a prior version stays reachable once a later call moves the workspace on.is_dirty:git status --porcelainis non-empty, or HEAD isn’t the expected id (the stack tip) or one of its ancestors.position:git checkout --detach <commit>, to sit on one patch of a stack.remove_workspace:git worktree remove, plus everyrefs/review-queue/<name>/*ref.
A failed patch application leaves the workspace in place (the caller should record
Status::ApplyFailed) rather than being silently cleaned up.