Fixes issues with missing repoPath

Allows commit search without an active editor
This commit is contained in:
Eric Amodio
2017-05-22 16:04:46 -04:00
parent ec6ca8188c
commit 49fa9b5078
6 changed files with 18 additions and 13 deletions

View File

@@ -32,8 +32,8 @@ export class ShowQuickBranchHistoryCommand extends ActiveEditorCachedCommand {
let progressCancellation = args.branch === undefined ? undefined : BranchHistoryQuickPick.showProgress(args.branch);
try {
const repoPath = (gitUri && gitUri.repoPath) || this.git.repoPath;
if (repoPath === undefined) return window.showWarningMessage(`Unable to show branch history`);
const repoPath = gitUri === undefined ? this.git.repoPath : gitUri.repoPath;
if (!repoPath) return window.showWarningMessage(`Unable to show branch history`);
if (args.branch === undefined) {
const branches = await this.git.getBranches(repoPath);