Structs§
- Command
Result - Result of running a command, with stdout captured as String.
Functions§
- branch_
exists - Check if a branch exists.
- canonicalize_
or - Canonicalize a path, falling back to the original path on failure.
- detect_
default_ branch - Auto-detect the repository’s default branch.
- fetch_
and_ rebase_ target - Fetch from remote and determine the rebase target for a base branch.
- find_
worktree_ by_ branch - Find worktree path by branch name.
- find_
worktree_ by_ intended_ branch - Find worktree path by intended branch name (from metadata).
- find_
worktree_ by_ name - Find worktree by directory name.
- get_
branch_ name_ error - Get descriptive error message for invalid branch name.
- get_
config - Get a git config value (local scope).
- get_
current_ branch - Get the current branch name.
- get_
feature_ worktrees - Get feature worktrees, excluding main repo and detached entries.
- get_
main_ repo_ root - Get main repository path, even when called from a worktree.
- get_
pr_ state - Query GitHub PR state for a branch using
ghCLI. - get_
repo_ root - Get the root directory of the git repository.
- git_
command - Run a git command.
- has_
command - Check if a command is available in PATH.
- is_
branch_ merged - Check if a branch has been merged into the base branch.
- is_
non_ interactive - Check if running in non-interactive environment.
- is_
valid_ branch_ name - Check if a branch name is valid according to git rules.
- normalize_
branch_ name - Normalize branch name by removing refs/heads/ prefix if present.
- parse_
worktrees - Parse
git worktree list --porcelainoutput. - remote_
branch_ exists - Check if a branch exists on a remote.
- remove_
worktree_ safe - Remove a git worktree with platform-safe fallback.
- run_
command - Run a shell command.
- set_
config - Set a git config value (local scope).
- unset_
config - Unset a git config value.
Type Aliases§
- Worktree
Entry - Parsed worktree entry: (branch_or_detached, path).