UNPKG

@dharshansr/gitgenius

Version:

AI-powered commit message generator with enhanced features

101 lines 2.45 kB
export interface GitState { isDetachedHead: boolean; hasConflicts: boolean; hasMergeInProgress: boolean; hasRebaseInProgress: boolean; isDirty: boolean; hasUncommittedChanges: boolean; hasUntrackedFiles: boolean; hasStagedChanges: boolean; currentBranch: string | null; currentCommit: string; } export interface WorktreeInfo { path: string; branch: string | null; commit: string; isMain: boolean; } export interface SubmoduleInfo { path: string; url: string; branch: string | null; commit: string; isInitialized: boolean; } export declare class GitStateManager { private git; constructor(); /** * Get comprehensive Git state information */ getState(): Promise<GitState>; /** * Check if HEAD is detached */ isDetachedHead(): Promise<boolean>; /** * Check for merge conflicts */ private checkConflicts; /** * Check if a merge is in progress */ hasMergeInProgress(): Promise<boolean>; /** * Check if a rebase is in progress */ hasRebaseInProgress(): Promise<boolean>; /** * Ensure workspace is clean before dangerous operations */ ensureCleanWorkspace(allowStaged?: boolean): Promise<void>; /** * Handle detached HEAD state */ handleDetachedHead(): Promise<void>; /** * Get worktree information */ getWorktrees(): Promise<WorktreeInfo[]>; /** * Check if worktrees are in use */ hasWorktrees(): Promise<boolean>; /** * Get submodule information */ getSubmodules(): Promise<SubmoduleInfo[]>; /** * Check if repository has submodules */ hasSubmodules(): Promise<boolean>; /** * Initialize submodules */ initializeSubmodules(): Promise<void>; /** * Update submodules */ updateSubmodules(): Promise<void>; /** * Get detailed conflict information */ getConflictDetails(): Promise<string[]>; /** * Provide actionable conflict resolution hints */ getConflictResolutionHints(): Promise<string[]>; /** * Validate Git environment for operations */ validateEnvironment(): Promise<{ valid: boolean; errors: string[]; }>; /** * Display current Git state in a friendly format */ displayState(): Promise<void>; } //# sourceMappingURL=GitStateManager.d.ts.map