import type { GitClient } from "../ports/git.js"; export interface ChangedFilesOptions { cwd: string; git: GitClient; base?: string | undefined; head?: string | undefined; } export declare class GitError extends Error { constructor(message: string); } /** * List files changed between two refs, or between a ref and the working tree. * If head is omitted, diffs against the working tree. * If both base and head are omitted, diffs HEAD against the working tree. * * Throws GitError for invalid refs or non-git directories. * Returns empty array only when there are genuinely no changes. */ export type ChangedFileStatus = "added" | "modified" | "deleted" | "renamed"; export interface ChangedFile { readonly path: string; readonly status: ChangedFileStatus; readonly oldPath?: string; } /** * List files changed between two refs with rename detection. * Returns structured data including status and old path for renames. */ export declare function getChangedFilesWithStatus(opts: ChangedFilesOptions): Promise; export declare function getChangedFiles(opts: ChangedFilesOptions): Promise; /** * Get the content of a file at a specific git ref. * Returns null if the file doesn't exist at that ref (clean absence). * Throws GitError for invalid refs or git failures. * * Uses `git rev-parse --verify` and `git cat-file -e` for stable * detection — no error message parsing. */ export declare function getFileAtRef(ref: string, filePath: string, opts: { cwd: string; git: GitClient; }): Promise; //# sourceMappingURL=diff.d.ts.map