export interface GitLogEntry { sha: string; message: string; date: string; filesChanged: string[]; } /** * Ceiling on one async git invocation. A `git` that never returns — a * network-backed worktree, an index.lock held by another process — must fail * closed to "no revision" rather than pin a request open forever. Generous * enough that a cold `rev-parse` on a large repo still answers. * * Exported for the tests that assert the deadline is actually honoured. */ export declare const GIT_ASYNC_TIMEOUT_MS = 2000; export declare function isGitRepo(cwd: string): boolean; export declare function getHeadCommit(cwd: string): string | null; /** * Async twin of `getHeadCommit`, for callers on a request path. * * The sync export stays as it is — its callers are CLI, where blocking costs * nothing. A server is the opposite case: `execSync` holds the whole event * loop for the child's entire lifetime, so one file view stalls every other * in-flight request and every open SSE stream. Use this one from a handler. * * Settles within `GIT_ASYNC_TIMEOUT_MS` plus a small grace no matter what the * child does — see `execAsync` for why that needs a race rather than a timeout. */ export declare function getHeadCommitAsync(cwd: string): Promise; export declare function getGitLog(cwd: string, options?: { since?: string; limit?: number; }): GitLogEntry[]; export declare function getFilesChanged(cwd: string, fromCommit: string): string[]; //# sourceMappingURL=git.d.ts.map