Expand description
Git repository inspection state via gix.
Canonical definition: docs/specs/git-segments.md §GitContext type.
Two tiers of laziness. DataContext::git
decides whether to open the repo at all. Once opened, GitContext
exposes lazy dirty and
upstream accessors so segments that don’t
read those fields skip the scan entirely.
Structs§
- Dirty
Counts - Per-category dirty counts. Populated only in counts mode; indicator-mode scans leave this absent.
- GitContext
- Git state shared across all
git_*segments for the duration of one render invocation. Populated once byresolve_repoand held behind anArcinDataContext. - Upstream
State - Upstream-tracking branch comparison.
Enums§
- Dirty
State - Dirty-state result.
- Head
- Resolved HEAD state.
- Repo
Kind - Which flavor of repository
gix::discoverfound.
Functions§
- resolve_
repo - Walk up from
cwdlooking for a repository. ReturnsOk(None)only for the legitimate “no repo here” cases (no.gitfound walking up). Permission errors, trust rejections (safe.directory), ceiling-dir misconfig, and path-input errors surface asGitError::CorruptReposo they reach the user instead of silently hiding the segment.