Runtime policy for repo-wide git refreshes.
The profile is deliberately cheap to build. Ambient editor features use it to avoid expensive status modes in sparse or user-overridden huge repos.
Summary
Functions
Returns true when this profile still enumerates untracked files (:normal).
Builds the ambient git policy for git_root.
Returns the absolute path of the sole sparse-checkout leaf cone directory, or nil.
Types
@type size_class() :: :unknown | :large | :huge
@type t() :: %Minga.Git.Repo.Profile{ size_class: size_class(), sparse?: boolean(), timeout_ms: pos_integer(), untracked_mode: Minga.Git.untracked_mode() }
Functions
Returns true when this profile still enumerates untracked files (:normal).
A status timeout on such a profile means results were trimmed while untracked
files were in scope, so the omission must be surfaced as degraded (AC 2/5).
Sparse / :no profiles deliberately omit untracked files, so a timeout there
is not a visibility regression worth flagging.
Builds the ambient git policy for git_root.
Returns the absolute path of the sole sparse-checkout leaf cone directory, or nil.
In cone mode the sparse-checkout file lists each included directory as a
/dir/ line, alongside the /* and !/*/ preamble that keeps root files and
excludes everything else. Parent scaffolding lines such as !/apps/*/ are
ignored, so a nested checkout like apps/web resolves to the leaf cone only.
Any non-empty line outside those cone forms makes the file non-cone, so
callers keep git-root / nearest-marker behavior.