Expand description
Git worktree management for task execution.
Each task runs in an isolated worktree to prevent conflicts.
Worktrees are stored at ~/.orch/worktrees/<project>/<branch>/.
Structs§
- Worktree
Setup - Result of worktree setup.
Functions§
- abort_
worktree_ rebase - Abort any rebase in progress for a worktree.
- branch_
name - Generate a branch name from task ID and title.
- detect_
default_ branch - Detect the default branch of a repository.
- list_
project_ worktrees - List all worktree directories for a project.
- project_
name - Canonical project name used under
~/.orch/worktrees/. - project_
worktrees_ dir - Base worktrees directory for a project.
- rebase_
worktree_ on_ origin_ main - Rebase a worktree on top of
origin/{default_branch}. - resolve_
main_ repo - Resolve PROJECT_DIR to the main repo if it’s inside a worktree.
- setup_
worktree - Set up a worktree for task execution.
- task_
id_ from_ worktree_ name - Extract a task ID from a worktree directory name.
- validate_
worktree_ gitdir - Validate that a worktree directory has a working gitdir link.