mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-19 17:25:57 -05:00
Reworks git command error handling
Switches to use the new diffWith command
This commit is contained in:
@@ -15,7 +15,9 @@ export class GitContentProvider implements TextDocumentContentProvider {
|
||||
const data = GitService.fromGitContentUri(uri);
|
||||
const fileName = data.originalFileName || data.fileName;
|
||||
try {
|
||||
let text = await this.git.getVersionedFileText(data.repoPath, fileName, data.sha);
|
||||
let text = data.sha !== GitService.fakeSha
|
||||
? await this.git.getVersionedFileText(data.repoPath, fileName, data.sha)
|
||||
: '';
|
||||
if (data.decoration) {
|
||||
text = `${data.decoration}\n${text}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user