1 |
|
2 | export interface BranchDeletionSummary {
|
3 | branch: string;
|
4 | hash: any;
|
5 | success: boolean;
|
6 | }
|
7 |
|
8 | export interface BranchSummary {
|
9 | detached: boolean;
|
10 | current: string;
|
11 | all: string[];
|
12 | branches: {[key: string]: {
|
13 | current: string,
|
14 | name: string,
|
15 | commit: string,
|
16 | label: string
|
17 | }};
|
18 | }
|
19 |
|
20 | export interface CommitSummary {
|
21 | author: null | {
|
22 | email: string;
|
23 | name: string;
|
24 | };
|
25 | branch: string;
|
26 | commit: string;
|
27 | summary: {
|
28 | changes: number;
|
29 | insertions: number;
|
30 | deletions: number;
|
31 | };
|
32 | }
|
33 |
|
34 | export interface DiffResultTextFile {
|
35 | file: string;
|
36 | changes: number,
|
37 | insertions: number;
|
38 | deletions: number;
|
39 | binary: boolean;
|
40 | }
|
41 |
|
42 | export interface DiffResultBinaryFile {
|
43 | file: string;
|
44 | before: number;
|
45 | after: number;
|
46 | binary: boolean;
|
47 | }
|
48 |
|
49 | export interface DiffResult {
|
50 |
|
51 | changed: number;
|
52 |
|
53 |
|
54 | files: Array<DiffResultTextFile | DiffResultBinaryFile>;
|
55 |
|
56 |
|
57 | insertions: number;
|
58 |
|
59 |
|
60 | deletions: number;
|
61 | }
|
62 |
|
63 | export interface FetchResult {
|
64 | raw: string;
|
65 | remote: string | null;
|
66 | branches: {
|
67 | name: string;
|
68 | tracking: string;
|
69 | }[];
|
70 | tags: {
|
71 | name: string;
|
72 | tracking: string;
|
73 | }[];
|
74 | }
|
75 |
|
76 | export interface MoveSummary {
|
77 | moves: any[];
|
78 | }
|
79 |
|
80 | export interface PullResult {
|
81 |
|
82 |
|
83 | files: string[];
|
84 |
|
85 |
|
86 | insertions: {[key: string]: number};
|
87 |
|
88 |
|
89 | deletions: any;
|
90 |
|
91 | summary: {
|
92 | changes: number;
|
93 | insertions: number;
|
94 | deletions: number;
|
95 | };
|
96 |
|
97 |
|
98 | created: string[];
|
99 |
|
100 |
|
101 | deleted: string[];
|
102 | }
|
103 |
|
104 | export interface RemoteWithoutRefs {
|
105 | name: string;
|
106 | }
|
107 |
|
108 | export interface RemoteWithRefs extends RemoteWithoutRefs {
|
109 | refs: {
|
110 | fetch: string;
|
111 | push: string;
|
112 | }
|
113 | }
|
114 |
|
115 | export interface StatusResultRenamed {
|
116 | from: string;
|
117 | to: string;
|
118 | }
|
119 |
|
120 | export interface StatusResult {
|
121 | not_added: string[];
|
122 | conflicted: string[];
|
123 | created: string[];
|
124 | deleted: string[];
|
125 | modified: string[];
|
126 | renamed: StatusResultRenamed[];
|
127 | staged: string[];
|
128 | files: {
|
129 | path: string;
|
130 | index: string;
|
131 | working_dir: string;
|
132 | }[];
|
133 | ahead: number;
|
134 | behind: number;
|
135 | current: string;
|
136 | tracking: string;
|
137 |
|
138 | |
139 |
|
140 |
|
141 | isClean(): boolean;
|
142 | }
|
143 |
|
144 | export interface TagResult {
|
145 | all: string[];
|
146 | latest: string;
|
147 | }
|
148 |
|
149 | export interface DefaultLogFields {
|
150 | hash: string;
|
151 | date: string;
|
152 | message: string;
|
153 | refs: string;
|
154 | body: string;
|
155 | author_name: string;
|
156 | author_email: string;
|
157 | }
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 | export interface ListLogLine {
|
165 |
|
166 | |
167 |
|
168 |
|
169 |
|
170 |
|
171 | diff?: DiffResult;
|
172 | }
|
173 |
|
174 | export interface ListLogSummary<T = DefaultLogFields> {
|
175 | all: ReadonlyArray<T & ListLogLine>;
|
176 | total: number;
|
177 | latest: T & ListLogLine;
|
178 | }
|