Skip to main content

Module worktree

Module worktree 

Source
Expand description

Git worktree operations implemented with plain git worktree commands.

Worktrees give each coding agent an isolated working directory that shares the main repository’s object database. DevFlow places them under <project_root>/.worktrees/ so they are easy to find and clean up.

Structs§

WorktreeInfo
One entry from git worktree list --porcelain.

Enums§

WorktreeError
Errors produced by worktree operations.

Functions§

add
Add a worktree.
add_detached
Add a worktree checked out at commitish in detached HEAD state.
list
List all worktrees for the repository by parsing --porcelain output.
phase_agent_path
Worktree path for a single agent on a phase: .worktrees/phase-NN-<agent>.
phase_path
Worktree path for a phase: .worktrees/phase-NN.
prune
Prune stale worktree administrative entries via git worktree prune.
reference_path
Worktree path for the static reference snapshot: .worktrees/reference.
remove
Remove a worktree directory via git worktree remove [--force] <path>.
worktrees_dir
The .worktrees directory for a project root.