mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-15 17:25:33 -05:00
Fixes issues with diff with previous
Wouldn't always grab the correct commit
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user