Skip to main content

Module git_utils

Module git_utils 

Source
Expand description

Git utilities: repo detection, status, diff, and history.

Used by the system prompt builder to inject git context.

Functionsยง

build_git_context
Build a git context string for the system prompt.
current_branch
Get current branch name.
get_repo_root
Get the root of the git repository.
git_diff
Get git diff (staged + unstaged).
git_status
Get git status (short format).
is_git_repo
Check if a path is inside a git repository.
list_modified_files
List modified files (both staged and unstaged).
recent_commits
Get recent commit history (one-line format).