From 6b241a6845d17992a5a754d5eaf32fd1824ef74e Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 21 Jan 2021 01:06:48 -0500 Subject: [PATCH] Closes #111210 - adds openRepository api --- extensions/git/src/api/api1.ts | 5 +++++ extensions/git/src/api/git.d.ts | 1 + 2 files changed, 6 insertions(+) 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;