Documentation
¶
Overview ¶
Package gitread reads git repository state straight out of .git, with no exec dependency and no git library: the daemon must work on machines where a git binary may not exist, and hooks fire on every prompt. The readers back the provenance stamp on captured plans and subagent notes (internal/hooks) and the gardener's stale-plan ship evidence (internal/gardener). Every failure yields a zero value -- all reads are best-effort by design.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReflogEntry ¶
ReflogEntry is one HEAD reflog line: HEAD moved from Old to New, and Message says why ("commit: <subject>", "merge <branch>: Fast-forward", "checkout: moving from a to b", ...).
func ReflogHEAD ¶
func ReflogHEAD(cwd string) []ReflogEntry
ReflogHEAD returns the HEAD reflog at cwd, oldest first -- the repo's local record of every commit, merge, and checkout that moved HEAD. Worktrees keep their own HEAD log under their gitdir, so a worktree cwd reads that worktree's history. nil when the repo or its log cannot be read (a fresh clone, a pruned log): absent history is not evidence of anything.