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

@@ -43,9 +43,12 @@ export class GitUri extends Uri {
const commit = commitOrRepoPath;
base._fsPath = path.resolve(commit.repoPath, commit.originalFileName || commit.fileName);
if (commit.repoPath !== undefined) {
this.repoPath = commit.repoPath;
}
if (commit.sha !== undefined && !GitService.isUncommitted(commit.sha)) {
this.sha = commit.sha;
this.repoPath = commit.repoPath;
}
}
}