Skip to main content

load_identity_config

Function load_identity_config 

Source
pub fn load_identity_config(
    identity: &WorktreeIdentity,
) -> Result<LoadedConfig, ConfigError>
Expand description

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.

In TS you’d write (pseudocode):

async function loadIdentityConfig(identity: WorktreeIdentity): Promise<LoadedConfig>;