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-invalidevent for a rejected configuration.Stringis 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.
&WorktreeIdentityborrows 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.