Skip to main content

run_bounded_push

Function run_bounded_push 

Source
pub fn run_bounded_push(
    command: Command,
    deadline: Duration,
    grace: Duration,
) -> Result<PushAttempt, SingleFlightError>
Expand description

What: Run a push command to its end or its deadline and capture its interleaved output. Why: Both streams share one anonymous file so lines keep the order Git wrote them, and a file needs no reader thread that a stuck helper could keep alive. A stopped push becomes a failed attempt that says so, so the commit stays saved and the failure is recorded for later invocations.

In TS you’d write (pseudocode):

async function runBoundedPush({ command, deadlineMs, graceMs }): Promise<PushAttempt>;