/** * Git Context Analyzer * Provides git history, blame, diff, and change analysis */ export interface GitLogEntry { hash: string; author: string; date: string; message: string; files?: string[]; } export interface GitBlameEntry { line: number; hash: string; author: string; date: string; content: string; } /** * Check if directory is a git repo. * @param cwd - The working directory to check * @returns True if the directory is a git repository */ export declare function isGitRepo(cwd: string): Promise; /** * Get recent git log. * @param cwd - The working directory * @param options - Log options * @param options.count - Maximum number of entries * @param options.filePath - Filter by file path * @param options.author - Filter by author * @param options.since - Filter by date * @returns Array of git log entries */ export declare function getGitLog(cwd: string, options?: { count?: number; filePath?: string; author?: string; since?: string; }): Promise; /** * Get git log with changed files. * @param cwd - The working directory * @param count - Maximum number of entries * @returns Array of git log entries including changed file lists */ export declare function getGitLogWithFiles(cwd: string, count?: number): Promise; /** * Git diff -- staged, unstaged, or between refs. * @param cwd - The working directory * @param options - Diff options * @param options.staged - Show staged changes * @param options.ref1 - First ref for comparison * @param options.ref2 - Second ref for comparison * @param options.filePath - Filter by file path * @param options.stat - Show diff stats only * @returns The diff output as a string */ export declare function getGitDiff(cwd: string, options?: { staged?: boolean; ref1?: string; ref2?: string; filePath?: string; stat?: boolean; }): Promise; /** * Git blame for a file. * @param cwd - The working directory * @param filePath - Path to the file * @param options - Blame options * @param options.startLine - Start line for range * @param options.endLine - End line for range * @returns Array of blame entries per line */ export declare function getGitBlame(cwd: string, filePath: string, options?: { startLine?: number; endLine?: number; }): Promise; /** * Get current git status. * @param cwd - The working directory * @returns Short-format git status output */ export declare function getGitStatus(cwd: string): Promise; /** * Get current branch name. * @param cwd - The working directory * @returns The current branch name */ export declare function getGitBranch(cwd: string): Promise; /** * Get list of all branches. * @param cwd - The working directory * @returns Array of branch names */ export declare function getGitBranches(cwd: string): Promise; /** * Show a specific commit. * @param cwd - The working directory * @param ref - The commit reference * @param stat - Whether to show stats only * @returns The commit details as a string */ export declare function getGitShow(cwd: string, ref: string, stat?: boolean): Promise; /** * Get contributors for a file or repo. * @param cwd - The working directory * @param filePath - Optional file path to filter by * @returns Array of contributors with commit counts */ export declare function getContributors(cwd: string, filePath?: string): Promise<{ author: string; commits: number; }[]>; //# sourceMappingURL=git.d.ts.map