Skip to main content

run_git

Function run_git 

Source
pub fn run_git(
    args: &[&str],
    cwd: &Path,
    timeout: Duration,
    env: &[(&str, &str)],
) -> Result<GitOutput, String>
Expand description

Run git <args> in cwd with extra env vars and a wall-clock timeout.

No shell is involved (args are passed directly). Interactive credential prompts are disabled so an auth-required remote errors immediately rather than blocking. stdout/stderr are drained on dedicated threads to avoid pipe-buffer deadlock on chatty commands (e.g. clone progress).