diff --git a/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts index 304968b00e6..c5f7cd9246d 100644 --- a/extensions/git/src/api/api1.ts +++ b/extensions/git/src/api/api1.ts @@ -269,6 +269,11 @@ export class ApiImpl implements API { return this.getRepository(root) || null; } + async openRepository(root: Uri): Promise { + await this._model.openRepository(root.fsPath); + return this.getRepository(root) || null; + } + registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable { return this._model.registerRemoteSourceProvider(provider); } diff --git a/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts index 719aef47006..43832f18600 100644 --- a/extensions/git/src/api/git.d.ts +++ b/extensions/git/src/api/git.d.ts @@ -254,6 +254,7 @@ export interface API { toGitUri(uri: Uri, ref: string): Uri; getRepository(uri: Uri): Repository | null; init(root: Uri): Promise; + openRepository(root: Uri): Promise registerRemoteSourceProvider(provider: RemoteSourceProvider): Disposable; registerCredentialsProvider(provider: CredentialsProvider): Disposable;