Files
vscode-front-matter/src/models/GitRepository.ts
T
2024-02-15 13:49:57 +01:00

35 lines
591 B
TypeScript

import { Event } from 'vscode';
export type GitAPIState = 'uninitialized' | 'initialized';
export interface GitRepository {
state: GitRepositoryState;
rootUri: {
fsPath: string;
path: string;
};
repository: {
getBranches: () => Promise<GitBranch[]>;
};
}
export interface GitRepositoryState {
HEAD?: GitBranch;
onDidChange: Event<void>;
}
export interface GitBranch {
type: number;
name?: string;
upstream: Upstream;
commit: string;
ahead: number;
behind: number;
}
export interface Upstream {
name: string;
remote: string;
commit: string;
}