File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,12 +19,16 @@ class ApiInputBox implements InputBox {
1919
2020export class ApiRepository implements Repository {
2121
22- readonly rootUri : Uri ;
23- readonly inputBox : InputBox ;
22+ readonly rootUri : Uri = Uri . file ( this . _repository . root ) ;
23+ readonly inputBox : InputBox = new ApiInputBox ( this . _repository . inputBox ) ;
2424
25- constructor ( _repository : BaseRepository ) {
26- this . rootUri = Uri . file ( _repository . root ) ;
27- this . inputBox = new ApiInputBox ( _repository . inputBox ) ;
25+ readonly onDidRunGitStatus : Event < void > = this . _repository . onDidRunGitStatus ;
26+
27+ constructor ( private _repository : BaseRepository ) {
28+ }
29+
30+ status ( ) : Promise < void > {
31+ return this . _repository . status ( ) ;
2832 }
2933}
3034
Original file line number Diff line number Diff line change @@ -10,20 +10,24 @@ export interface Git {
1010 readonly path : string ;
1111}
1212
13- export interface API {
14- readonly git : Git ;
15- readonly repositories : Repository [ ] ;
16- readonly onDidOpenRepository : Event < Repository > ;
17- readonly onDidCloseRepository : Event < Repository > ;
18- }
19-
2013export interface InputBox {
2114 value : string ;
2215}
2316
2417export interface Repository {
2518 readonly rootUri : Uri ;
2619 readonly inputBox : InputBox ;
20+
21+ readonly onDidRunGitStatus : Event < void > ;
22+
23+ status ( ) : Promise < void > ;
24+ }
25+
26+ export interface API {
27+ readonly git : Git ;
28+ readonly repositories : Repository [ ] ;
29+ readonly onDidOpenRepository : Event < Repository > ;
30+ readonly onDidCloseRepository : Event < Repository > ;
2731}
2832
2933export interface GitExtension {
You can’t perform that action at this time.
0 commit comments