Skip to main content

Module git_util

Module git_util 

Source
Expand description

Minimal Git CLI helpers used by capture identity. Pure parsers remain separate from the shared bounded subprocess executor; recursive test helpers exercise large-output, timeout, descendant, and cleanup paths.

Structs§

GitCommitEvidence
GitCommitMetadata

Enums§

GitEvidenceKind

Functions§

detect_commit_metadata
parse_authored_epoch_output
parse_branch_output
parse_changed_files_output
parse_toplevel_output
Parse the output of git rev-parse --show-toplevel. Returns None for empty or whitespace-only input so callers can fall back cleanly.
resolve_commit_metadata
resolve_toplevel
Spawn git rev-parse --show-toplevel in cwd. Returns None when git is unavailable, the directory is outside any git worktree, or the output is empty. Single subprocess, no network.
sanitize_commit_metadata
short_sha_for