From fb2533a2ac0f1196b4c71e7f50bfbe23ea1f6f42 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 12 Nov 2020 01:47:43 -0500 Subject: [PATCH] Uses highlander repo path if no editors are open --- src/commands/showQuickBranchHistory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/showQuickBranchHistory.ts b/src/commands/showQuickBranchHistory.ts index c63fe90..a9996ab 100644 --- a/src/commands/showQuickBranchHistory.ts +++ b/src/commands/showQuickBranchHistory.ts @@ -4,6 +4,7 @@ import { ActiveEditorCachedCommand, command, CommandContext, Commands, getComman import { GitReference } from '../git/git'; import { executeGitCommand } from './gitCommands'; import { GitUri } from '../git/gitUri'; +import { Container } from '../container'; export interface ShowQuickBranchHistoryCommandArgs { repoPath?: string; @@ -31,8 +32,7 @@ export class ShowQuickBranchHistoryCommand extends ActiveEditorCachedCommand { const gitUri = uri != null ? await GitUri.fromUri(uri) : undefined; - const repoPath = args?.repoPath ?? gitUri?.repoPath; - + const repoPath = args?.repoPath ?? gitUri?.repoPath ?? Container.git.getHighlanderRepoPath(); let ref: GitReference | 'HEAD' | undefined; if (repoPath != null) { if (args?.branch != null) {