Enums§
- Head
State - Represents the state of HEAD in a git repository
Functions§
- ensure_
repo_ ready_ for_ sync - Returns Ok(()) if the repository is in a state suitable to begin a sync.
- 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. For unborn branches, returns an error with descriptive message.
- 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_
head_ state - Get the current HEAD state with full type safety
- get_
main_ repo_ for_ worktree - Get the main repository path for a worktree
- get_
remote_ url - Get the remote URL for a git repository
- get_
sync_ branch - Returns the current branch name or an error when sync is unsafe.
- 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 (not a submodule)
- is_
worktree_ dirty - Return true if the repository’s working tree has any changes (including untracked)
- try_
get_ origin_ identity - Get the canonical identity of a repository’s origin remote, if available.