Documentation
¶
Overview ¶
Package gitutil provides the minimal git introspection the context-sync configurator needs: repo root, origin remote, current branch, HEAD sha, plus an idempotent .gitignore helper anchored at the repo root (DX-10).
It shells out to the `git` binary (already a hard dependency of the workflow) and degrades gracefully: every function returns a usable zero value when not in a repo or when git is unavailable, so callers never crash a hook.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureGitignore ¶
EnsureGitignore makes sure pattern appears in <root>/.gitignore. It reads the file (creating it if absent), checks for an exact-line match, and appends the pattern atomically only if missing. Returns true if it added the pattern.