Skip to main content

capture

Function capture 

Source
pub fn capture(cwd: &Path, timestamp_ms: i64) -> Option<GitMetadataRecord>
Expand description

Best-effort capture of cwd’s git branch/sha/dirty state. None when cwd isn’t inside a git repo, git isn’t on PATH, or the repo has no commits yet (rev-parse HEAD fails on an empty repo) — this is informational provenance, never worth failing agent construction over, the same posture agent::env_context_git_status already established.