init
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
export type FileStatusKind =
|
||||
| "modified"
|
||||
| "added"
|
||||
| "deleted"
|
||||
| "renamed"
|
||||
| "untracked"
|
||||
| "conflicted"
|
||||
| "unknown";
|
||||
|
||||
export interface GitStatus {
|
||||
repo_path: string;
|
||||
current_branch: string | null;
|
||||
upstream: string | null;
|
||||
ahead: number;
|
||||
behind: number;
|
||||
files: GitFileStatus[];
|
||||
clean: boolean;
|
||||
}
|
||||
|
||||
export interface GitFileStatus {
|
||||
path: string;
|
||||
old_path: string | null;
|
||||
staged: FileStatusKind | null;
|
||||
unstaged: FileStatusKind | null;
|
||||
}
|
||||
|
||||
export interface GitBranch {
|
||||
name: string;
|
||||
current: boolean;
|
||||
remote: boolean;
|
||||
}
|
||||
|
||||
export interface GitCommit {
|
||||
hash: string;
|
||||
short_hash: string;
|
||||
summary: string;
|
||||
author_name: string;
|
||||
author_email: string;
|
||||
date: string;
|
||||
refs: string[];
|
||||
files: GitCommitFile[];
|
||||
}
|
||||
|
||||
export interface GitCommitFile {
|
||||
path: string;
|
||||
old_path: string | null;
|
||||
status: FileStatusKind;
|
||||
}
|
||||
|
||||
export interface GitRepositoryFile {
|
||||
path: string;
|
||||
tracked: boolean;
|
||||
status: FileStatusKind | null;
|
||||
}
|
||||
Reference in New Issue
Block a user