diff --git a/src/env/node/git/localGitProvider.ts b/src/env/node/git/localGitProvider.ts index b74e8e1..f9ec04b 100644 --- a/src/env/node/git/localGitProvider.ts +++ b/src/env/node/git/localGitProvider.ts @@ -144,7 +144,7 @@ interface RepositoryInfo { } export class LocalGitProvider implements GitProvider, Disposable { - readonly descriptor: GitProviderDescriptor = { id: GitProviderId.Git, name: 'Git' }; + readonly descriptor: GitProviderDescriptor = { id: GitProviderId.Git, name: 'Git', virtual: false }; readonly supportedSchemes: Set = new Set([ Schemes.File, Schemes.Git, diff --git a/src/env/node/git/vslsGitProvider.ts b/src/env/node/git/vslsGitProvider.ts index b8fef9c..55776fa 100644 --- a/src/env/node/git/vslsGitProvider.ts +++ b/src/env/node/git/vslsGitProvider.ts @@ -34,7 +34,11 @@ export class VslsGit extends Git { } export class VslsGitProvider extends LocalGitProvider { - override readonly descriptor: GitProviderDescriptor = { id: GitProviderId.Vsls, name: 'Live Share' }; + override readonly descriptor: GitProviderDescriptor = { + id: GitProviderId.Vsls, + name: 'Live Share', + virtual: false, + }; override readonly supportedSchemes: Set = new Set([Schemes.Vsls, Schemes.VslsScc]); override async discoverRepositories(uri: Uri): Promise { diff --git a/src/git/gitProvider.ts b/src/git/gitProvider.ts index cf9bcb5..2b54bba 100644 --- a/src/git/gitProvider.ts +++ b/src/git/gitProvider.ts @@ -35,6 +35,7 @@ export const enum GitProviderId { export interface GitProviderDescriptor { readonly id: GitProviderId; readonly name: string; + readonly virtual: boolean; } export interface RepositoryInitWatcher extends Disposable { diff --git a/src/git/models/repository.ts b/src/git/models/repository.ts index a9ecf23..c2a0cb4 100644 --- a/src/git/models/repository.ts +++ b/src/git/models/repository.ts @@ -265,6 +265,10 @@ export class Repository implements Disposable { this._disposable.dispose(); } + get virtual(): boolean { + return this.provider.virtual; + } + get path(): string { return this.uri.scheme === Schemes.File ? normalizePath(this.uri.fsPath) : this.uri.toString(); } diff --git a/src/plus/github/githubGitProvider.ts b/src/plus/github/githubGitProvider.ts index 7a7a4ac..2377182 100644 --- a/src/plus/github/githubGitProvider.ts +++ b/src/plus/github/githubGitProvider.ts @@ -83,7 +83,7 @@ interface RepositoryInfo { } export class GitHubGitProvider implements GitProvider, Disposable { - descriptor = { id: GitProviderId.GitHub, name: 'GitHub' }; + descriptor = { id: GitProviderId.GitHub, name: 'GitHub', virtual: true }; readonly supportedSchemes: Set = new Set([Schemes.Virtual, Schemes.GitHub, Schemes.PRs]); private _onDidChangeRepository = new EventEmitter();