Skip to main content

Module invocation_config

Module invocation_config 

Source
Expand description

Configuration of the repository one invocation selects. What: Load the policy configuration of the worktree one invocation runs in, and render the events configuration loading can produce. Why: Both wrapped Git commands and git cli-git check/fix need the same answer: what does the cli-git.config.jsonc of the worktree Git reported say.

In TS you’d write (pseudocode):

// const loaded = await loadIdentityConfig(location.identity);

Functions§

config_invalid_event
What: Render the config-invalid event for a rejected configuration. String is the owned, line-terminated JSON line. Why: Configuration failures are machine-readable events with exit status 2, on standard error for wrapped commands and standard output for direct commands.
legacy_warning_events
What: Render one warning event per legacy file left beside the JSONC file. Why: The stale executable configuration is reported on every configuration load, never ignored silently; events are numbered from zero in file order.
load_identity_config
What: Load the configuration for the worktree Git reported for this invocation. &WorktreeIdentity borrows that answer; Result<LoadedConfig, ConfigError> is the settings or the rejection. Why: The caller already asked Git where the command runs, once, so this function starts no process. Outside a worktree (no repository, a bare repository, the inside of .git) there is no configuration file and the defaults apply.