pub fn lock_wait_limit(environment: &[(OsString, OsString)]) -> DurationExpand description
What: How long a process waits for another invocation’s push lock: the environment’s value, or the holder’s whole budget plus two stop graces plus a margin. Why: The holder’s steps end within the budget, and the one step in flight when it runs out needs the stop grace to end and the kill’s collection another, so the default waiter outlasts a holder that is working inside its rights before it reports the lock as stuck.
In TS you’d write (pseudocode):
const lockWaitMs = secondsOf(env.CLI_GIT_PUSH_LOCK_WAIT_SECONDS) ?? pushDeadlineMs + STOP_GRACE_MS + LOCK_WAIT_MARGIN_MS;