pub fn discard_worker_worktree(
repo: &Path,
label: &str,
path: &Path,
ensured: WorktreeEnsure,
) -> Option<String>Expand description
Undo the work ensure_worker_worktree did for a spawn that was
then refused, so the refusal strands neither worktree nor branch.
The worktree goes only when ensure created it, the branch only when
ensure minted it - an AttachedExistingBranch keeps the branch,
which predates the call and may hold the worker’s only copy of its
commits. Returns git’s complaint when something had to stay behind;
the spawn is already refused, so a failure is a warning, not an
error.