Skip to main content

run_git_config

Function run_git_config 

Source
pub async fn run_git_config(
    cwd: &Path,
    git_dir: &Path,
    key: &str,
    value: &str,
) -> Result<(), GitError>
Expand description

Run git config --local <key> <value> with GIT_DIR set.

Returns Err(GitError::BackendNotAvailable) if the git binary can’t be spawned (test gate); otherwise returns Err(Io) on other OS-level failures. Callers that are OK with a best-effort apply swallow the error.