Documentation
¶
Overview ¶
Package gitexec runs the git CLI from inside the codebase. Callers that need plain stdout from `git <args>` (e.g. parsing `rev-parse HEAD` output) get a shared exec.Command + stderr-capture + error-wrap helper.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run runs `git <args>` in repoRoot and returns stdout as a string. stderr is captured separately and surfaced in the error wrap on non-zero exit. Stdout and stderr are NOT combined — git emits warnings on stderr even on successful commands (shallow-clone notices, safe.directory advisories, etc.) and merging them would corrupt parsed output (e.g., strconv.Atoi on the result of `rev-list --count` would fail).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.