mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
@@ -53,6 +53,12 @@ export class GitContentProvider {
|
||||
}
|
||||
|
||||
async provideTextDocumentContent(uri: Uri): Promise<string> {
|
||||
const cacheKey = uri.toString();
|
||||
const timestamp = new Date().getTime();
|
||||
const cacheValue = { uri, timestamp };
|
||||
|
||||
this.cache[cacheKey] = cacheValue;
|
||||
|
||||
if (uri.scheme === 'git-original') {
|
||||
uri = new Uri().with({ scheme: 'git', path: uri.query });
|
||||
}
|
||||
@@ -66,9 +72,6 @@ export class GitContentProvider {
|
||||
ref = indexStatus ? '' : 'HEAD';
|
||||
}
|
||||
|
||||
const timestamp = new Date().getTime();
|
||||
this.cache[uri.toString()] = { uri, timestamp };
|
||||
|
||||
try {
|
||||
const result = await this.model.show(ref, uri);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user