import type { GitRunner } from "./types.js"; export type RefSpec = { ref: string; expectedHash: string; }; /** Parses `for-each-ref --format=%(refname)%00%(objectname)` output. Null when * a line does not hold exactly one NUL: a malformed listing must never be * mistaken for "no refs are present". */ export declare function parseRefLines(stdout: string): RefSpec[] | null; /** Deletes refs in one `update-ref --stdin` batch, halving on failure so a * single unexpected hash cannot block the rest. `onSingleFailure` receives * refs that still fail alone — that is how a caller reaches a loose-ref * unlink when git itself is unusable, so a throw falls through to halving * rather than aborting. A timeout aborts the walk instead: the repository is * busy and splitting only multiplies the wait. */ export declare function deleteRefsBatched(git: GitRunner, refs: readonly RefSpec[], options?: { env?: Record; timeoutMs?: number; onSingleFailure?: (ref: RefSpec) => Promise; }): Promise<"ok" | "failed" | "timeout">;