Module utils

Module utils 

Source

Functions§

find_repo_root
Find the repository root from a given path
get_control_repo_root
Get the control repository root (main repo for worktrees, repo root otherwise) This is the authoritative location for .thoughts/config.json and .thoughts-data
get_current_branch
Get the current branch name, or “detached” if in detached HEAD state
get_current_control_repo_root
Get the control repository root for the current directory
get_current_repo
Get the current repository path, starting from current directory
get_main_repo_for_worktree
Get the main repository path for a worktree
get_remote_url
Get the remote URL for a git repository
init_repo
Initialize a new git repository
is_git_repo
Check if a path is a git repository
is_worktree
Check if a directory is a git worktree