@dharshansr/gitgenius
Version:
AI-powered commit message generator with enhanced features
48 lines • 1.8 kB
TypeScript
import { GitStats } from '../types.js';
import { GitStateManager } from '../utils/GitStateManager.js';
export declare class GitService {
private git;
private stateManager;
constructor();
checkIsRepo(): Promise<boolean>;
ensureGitRepo(): Promise<void>;
getCurrentBranch(): Promise<string>;
getStatus(): Promise<import("simple-git").StatusResult>;
getDiff(options?: string[]): Promise<string>;
getStagedDiff(): Promise<string>;
getLastCommitDiff(): Promise<string>;
getFileDiff(file: string): Promise<string>;
commit(message: string, options?: any): Promise<void>;
reset(options?: string[]): Promise<void>;
getLog(options: any): Promise<import("simple-git").LogResult<import("simple-git").DefaultLogFields>>;
getBranchLocal(): Promise<import("simple-git").BranchSummary>;
getConfig(key: string): Promise<import("simple-git").ConfigGetResult>;
addConfig(key: string, value: string): Promise<void>;
/**
* Get Git state manager
*/
getStateManager(): GitStateManager;
/**
* Check workspace cleanliness before operations
*/
ensureCleanWorkspace(allowStaged?: boolean): Promise<void>;
/**
* Check for detached HEAD and handle appropriately
*/
checkDetachedHead(): Promise<boolean>;
/**
* Get worktree information
*/
getWorktrees(): Promise<import("../utils/GitStateManager.js").WorktreeInfo[]>;
/**
* Get submodule information
*/
getSubmodules(): Promise<import("../utils/GitStateManager.js").SubmoduleInfo[]>;
/**
* Display current Git state
*/
displayState(): Promise<void>;
calculateStats(logs: any): GitStats;
displayStats(stats: GitStats, days: number, author?: string): void;
}
//# sourceMappingURL=GitService.d.ts.map