Fixes issues with diff with previous

Wouldn't always grab the correct commit
This commit is contained in:
Eric Amodio
2017-02-13 11:42:54 -05:00
parent 3ef538b713
commit d5d0c3a28d
6 changed files with 20 additions and 48 deletions

View File

@@ -42,6 +42,8 @@ export class GitUri extends Uri {
}
static fromUri(uri: Uri, git?: GitProvider) {
if (uri instanceof GitUri) return uri;
if (git) {
const gitUri = git.getGitUriForFile(uri.fsPath);
if (gitUri) return gitUri;