import { type ChildProcess, execFileSync } from 'child_process'; import type * as fs from 'fs'; import type { AppContext } from '../types/context.js'; import type * as fileUtils from './fileUtils.js'; export interface GitFileInfo { type: string; path: string; action: 'add' | 'delete' | 'ignore'; } interface DiffOptions { dir: string; gitRef?: string; existsSync: (path: string) => boolean; spawn: (command: string, args: string[], options?: { cwd: string; }) => ChildProcess; } export declare function diff({ dir, gitRef, existsSync, spawn, }: DiffOptions): Promise; export declare function log(dir: string, gitRef: string, execFileSyncStub?: typeof execFileSync): string[]; export declare function logAsync(dir: string, gitRef: string): Promise; interface LastCommitOptions { dir: string; fileName?: string; existsSync: (path: string) => boolean; execFileSync?: typeof execFileSync; fileUtils: typeof fileUtils; } interface LastCommitResult { lastCommit: string | undefined; latestCommit: string; } export declare function lastCommit({ ctx, dir, fileName, existsSync, execFileSync: _execFileSyncStub, // Kept for backward compatibility but not used (SEC-004: using async with timeout) fileUtils, }: LastCommitOptions & { ctx: AppContext; }): Promise; interface UpdateLastCommitOptions { ctx: AppContext; dir: string; latest: string | undefined; fileUtils: typeof fileUtils; fs: typeof fs; } export declare function updateLastCommit({ ctx, dir, latest, fileUtils, fs, }: UpdateLastCommitOptions): Promise; export {}; //# sourceMappingURL=gitUtils.d.ts.map