Skip to main content

Module git_utils

Module git_utils 

Source
Expand description

Pure git plumbing shared across feature modules (sdd change binding, tool agents-md, skills config discovery, prompts paths).

Function bodies are moved verbatim from their original homes (sdd::change::git_native, skills::shared::git) so error messages stay byte-identical. Sdd-specific binding semantics (ChangeGitBinding, read/write_binding, start/attach/checkpoint flows) remain in sdd::change::git_native.

This module is a member of the top-level utility layer (future llman-core); it MUST NOT import feature modules (sdd/skills/tool/x).

Functionsยง

branch_diff
branch_has_upstream
current_branch
current_head_sha
find_git_root
Walk up from start looking for a .git entry (dir or worktree file).
git_common_dir
Resolve the absolute .git directory path.
git_ref_exists
is_default_branch
merge_base_sha
resolve_default_branch_ref
run_git
working_tree_clean
worktree_add
git worktree add <path> -b <branch> <base_sha> (creates and checks out).
worktree_exists
Check if a directory is already a git worktree.