Skip to main content

Module git_probe

Module git_probe 

Source
Expand description

Machine-parsed Git probes that keep “this is not a repository” separate from failures whose meaning is uncertain (damaged metadata, broken refs, signals).

Callers keep their own path decoding, canonicalization and error text; this module only decides which failures may be treated as certain absence.

Enums§

FailureKind
ProbeError

Functions§

command
A Git command whose diagnostics are always in the C locale.
head_commit
Verify repository access and the current commit without walking its parents.
probe_in_directory
A probe run with root as the child’s working directory; see toplevel_in_directory.
root_commits
git rev-list --max-parents=0 HEAD, run with -C root. spawned grows by the number of Git processes actually started, including the extra checks that verify an unborn branch.
supervised_output
Preserve the probes’ ordinary output and unbounded wait, while observing the child on the calling thread. No new timeout or cancellation policy is added.
toplevel_in_directory
git rev-parse --show-toplevel, run with root as the child’s working directory. A relative or empty PATH entry then finds git relative to root, as it does for any other command started in that folder.