Skip to main content

Module worktree

Module worktree 

Source
Expand description

Git worktree operations for autom8.

This module provides functions for managing git worktrees, enabling parallel execution of autom8 sessions on the same project.

Structs§

WorktreeInfo
Information about a git worktree.

Enums§

WorktreeResult
Result of ensuring a worktree exists.

Constants§

MAIN_SESSION_ID
Well-known session ID for the main repository.

Functions§

create_worktree
Create a new worktree at the specified path for the given branch.
ensure_worktree
Ensure a worktree exists for the specified branch.
format_worktree_error
Get detailed information about worktree creation failure.
generate_session_id
Generate a deterministic session ID from a worktree path.
generate_worktree_name
Generate the worktree path from a pattern and parameters.
generate_worktree_path
Generate the full path for a worktree.
get_current_session_id
Get the session ID for the current working directory.
get_git_repo_name
Get the git repository name (basename of the main repo root).
get_main_repo_root
Get the main repository root (works from any worktree).
get_main_session_id
Get the session ID for the main repository.
get_session_id_for_path
Get the session ID for a specific worktree path.
get_worktree_root
Get the worktree root for the current directory.
is_in_worktree
Check if the current working directory is inside a linked worktree.
list_worktrees
List all worktrees for the current repository.
remove_worktree
Remove a worktree at the specified path.
slugify_branch_name
Convert a branch name to a filesystem-safe slug.