/** * Git operations helper for auto-commit functionality */ import { Logger } from './logger'; /** * Result of a git operation */ export interface GitOperationResult { /** Whether the operation succeeded */ success: boolean; /** Output from the git command */ output?: string; /** Error message if failed */ error?: string; } /** * Git helper for auto-commit functionality */ export declare class GitHelper { private logger; constructor(logger: Logger); /** * Check if current directory is a git repository */ isGitRepository(): boolean; /** * Get current git status */ getStatus(): GitOperationResult; /** * Check if there are uncommitted changes */ hasUncommittedChanges(): boolean; /** * Get diff of changes * @param staged - Whether to get diff of staged changes */ getDiff(staged?: boolean): Promise; /** * Get list of changed files * @param revision Optional revision to check against (e.g. 'HEAD'). If omitted, checks working tree (staged + unstaged). */ getChangedFiles(revision?: string): string[]; /** * Get list of changed files against a base branch (e.g. origin/main) * Uses "git diff base...HEAD" (triple dot) */ getChangedFilesAgainstBase(base: string): string[]; /** * Get merge base between HEAD and a base branch */ getMergeBase(base: string): string | null; /** * Get diff against a base branch */ getDiffAgainstBase(base: string): string; /** * Get filtered diff (excluding locks) */ getFilteredDiff(base: string, staged?: boolean): string; /** * Stage files for commit */ addFiles(files: string[]): GitOperationResult; /** * Create a git commit */ commit(message: string): GitOperationResult; /** * Fetch changes from remote */ fetch(remote: string, branch: string): GitOperationResult; /** * Push commits to remote */ push(): GitOperationResult; /** * Auto-commit documentation changes * Stages files, commits with a standard message, and optionally pushes */ autoCommit(files: string[], symbolNames: string[], push?: boolean): GitOperationResult; /** * Create a commit message for documentation updates */ private createCommitMessage; } //# sourceMappingURL=git-helper.d.ts.map