pub fn wait_for_index_lock(repo_path: &Path, timeout: Duration) -> Result<()>Expand description
Wait for the git index lock to be released before starting a destructive operation. Polls the filesystem for the lock file to disappear. IDE locks are transient (milliseconds for a status check), so a short timeout catches the common case. Falls back to stale lock cleanup if the lock persists past the timeout.