/** Git types. The host runs the `git` program for the active workspace. */ export interface GitChange { path: string; originalPath?: string; index: string; worktree: string; } export interface GitStatus { available: boolean; repository: boolean; branch: string | null; changes: GitChange[]; } export interface GitLineInfo { commit: string; author: string; /** The author date in ISO 8601 format. */ date: string; summary: string; } /** Older hosts can have `git` without `push`, `pull`, `graph`, `commitDetails`, or `commitDiff`. Use `hasFeature` first. */ export interface GitApi { status(): Promise; diff(path: string, staged: boolean): Promise; stage(paths: string[]): Promise; unstage(paths: string[]): Promise; commit(message: string): Promise; push(): Promise; pull(): Promise; graph(): Promise; commitDetails(commit: string): Promise; commitDiff(commit: string, path: string): Promise; blame(path: string, line: number): Promise; } export interface GitGraphCommit { id: string; parents: string[]; refs: string[]; summary: string; author: string; date: string; } export interface GitGraph { commits: GitGraphCommit[]; } export interface GitCommitFile { path: string; originalPath?: string; status: string; } export interface GitCommitDetails { id: string; parents: string[]; author: string; date: string; message: string; files: GitCommitFile[]; }