pub struct LoadConfigOptions {
pub include_system: bool,
pub repo_local_only: bool,
pub protected_only: bool,
pub process_includes: bool,
pub command_includes: bool,
pub include_ctx: IncludeContext,
pub diagnostics: Option<DiagnosticsHandle>,
pub repo_caches: Option<Arc<RepoCaches>>,
}Expand description
Options controlling how ConfigSet::load merges files and includes.
Fields§
§include_system: boolLoad /etc/gitconfig (unless GIT_CONFIG_NOSYSTEM is enabled).
repo_local_only: boolLoad only the repository config file (no system/global/env overrides).
protected_only: boolGit protected config: system (optional), global, and command-line only.
process_includes: boolExpand [include] / [includeIf] while reading file-backed layers.
command_includes: boolExpand includes for synthetic command-line config built from GIT_CONFIG_PARAMETERS.
include_ctx: IncludeContextGit directory and environment used to evaluate [includeIf] conditions.
diagnostics: Option<DiagnosticsHandle>Optional sink for non-fatal config load warnings.
repo_caches: Option<Arc<RepoCaches>>When set, repository-local config is read at most once per crate::repo_caches::RepoCaches handle.
Implementations§
Source§impl LoadConfigOptions
impl LoadConfigOptions
Sourcepub fn standard(env: &Environment, git_dir: Option<&Path>) -> Self
pub fn standard(env: &Environment, git_dir: Option<&Path>) -> Self
Standard repository cascade (system, global, local, worktree, environment overrides).
Sourcepub fn repo_local_only(git_dir: &Path) -> Self
pub fn repo_local_only(git_dir: &Path) -> Self
Only .git/config (plus [include] targets), ignoring system/global/env overrides.
Sourcepub fn protected(env: &Environment, include_system: bool) -> Self
pub fn protected(env: &Environment, include_system: bool) -> Self
Git protected config (hooks): system (optional), global, and -c / env parameters only.