Skip to main content

with_lock_retry

Function with_lock_retry 

Source
pub fn with_lock_retry<F, R>(repo_path: &Path, operation: F) -> Result<R>
where F: Fn() -> Result<R, Error>,
Expand description

Execute a git2 operation with exponential-backoff retry on index lock contention. Retries up to 4 times with delays of 50ms, 100ms, 200ms before falling back to stale lock cleanup as a last resort.