diff --git a/src/commands/gitCommands.actions.ts b/src/commands/gitCommands.actions.ts index 7f4e8c8..bc83414 100644 --- a/src/commands/gitCommands.actions.ts +++ b/src/commands/gitCommands.actions.ts @@ -688,7 +688,7 @@ export namespace GitActions { export namespace Remote { export async function add(repo?: string | Repository) { if (repo == null) { - repo = Container.instance.git.highlanderRepoPath; + repo = Container.instance.git.highlander; if (repo == null) { const pick = await RepositoryPicker.show(undefined, 'Choose a repository to add a remote to'); diff --git a/src/commands/showQuickBranchHistory.ts b/src/commands/showQuickBranchHistory.ts index d668329..064c8dc 100644 --- a/src/commands/showQuickBranchHistory.ts +++ b/src/commands/showQuickBranchHistory.ts @@ -32,7 +32,7 @@ export class ShowQuickBranchHistoryCommand extends ActiveEditorCachedCommand { const gitUri = uri != null ? await GitUri.fromUri(uri) : undefined; - const repoPath = args?.repoPath ?? gitUri?.repoPath ?? this.container.git.highlanderRepoPath; + const repoPath = args?.repoPath ?? gitUri?.repoPath ?? this.container.git.highlander?.path; let ref: GitReference | 'HEAD' | undefined; if (repoPath != null) { if (args?.branch != null) { diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index 141f55e..ff5b351 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -264,11 +264,6 @@ export class GitProviderService implements Disposable { return this.repositoryCount === 1 ? first(this._repositories.values()) : undefined; } - @log() - get highlanderRepoPath(): string | undefined { - return this.highlander?.path; - } - // get readonly() { // return true; // // return this.container.vsls.readonly; diff --git a/src/terminal/linkProvider.ts b/src/terminal/linkProvider.ts index 2c2ef2e..4f7f9fe 100644 --- a/src/terminal/linkProvider.ts +++ b/src/terminal/linkProvider.ts @@ -38,8 +38,8 @@ export class GitTerminalLinkProvider implements Disposable, TerminalLinkProvider async provideTerminalLinks(context: TerminalLinkContext): Promise { if (context.line.trim().length === 0) return []; - const repoPath = this.container.git.highlanderRepoPath; - if (repoPath == null) return []; + const repoPath = this.container.git.highlander?.path; + if (!repoPath) return []; const links: GitTerminalLink[] = []; diff --git a/src/views/viewCommands.ts b/src/views/viewCommands.ts index 04eb90e..9a4f20f 100644 --- a/src/views/viewCommands.ts +++ b/src/views/viewCommands.ts @@ -656,7 +656,7 @@ export class ViewCommands { @debug() private switch(node?: ViewRefNode | BranchesNode) { if (node == null) { - return GitActions.switchTo(this.container.git.highlanderRepoPath); + return GitActions.switchTo(this.container.git.highlander); } if (!(node instanceof ViewRefNode) && !(node instanceof BranchesNode)) return Promise.resolve();