Skip to main content

run_git_within

Function run_git_within 

Source
pub(super) async fn run_git_within(
    cwd: &Path,
    args: &[&str],
    budget: Duration,
) -> GitOutput
Expand description

run_git with its command budget spelled: the shell gives a git child COMMAND_TIMEOUT, and a test gives it one of its own.

The budget is a bound on the machine, not on git: it is spent starting the child, so a loaded machine can hold a git’s first output past the shell’s 10 s and fail a scan that is merely slow - see scan_within for the measurement and the reproduction.