Expand description
Git worktree lifecycle for isolated phase runs.
Each batty work <phase> run gets a dedicated branch/worktree:
<phase-slug>-run-<NNN>.
The executor runs in that worktree. Cleanup is merge-aware:
- merged runs are removed (worktree + branch)
- rejected/failed/unmerged runs are retained for inspection
Structs§
Enums§
Functions§
- branch_
fully_ merged - Check if all commits on
branchsince diverging frombaseare already present onbase(e.g., via cherry-pick). - git_
current_ branch - Get the current branch name for a repository/worktree path.
- prepare_
agent_ worktrees - Prepare (or reuse) one worktree per parallel agent slot for a phase.
- prepare_
phase_ worktree - Create an isolated git worktree for a phase run.
- reset_
worktree_ to_ base - Reset a worktree to point at its base branch. Used to clean up after a cherry-pick merge has made the task branch redundant.
- resolve_
phase_ worktree - Resolve the phase worktree for a run.
- sync_
phase_ board_ to_ worktree - Sync the phase board from the source tree into the worktree.