提交 e66408ab 编写于 作者: J Joao Moreno

dirty diff doesn't clear on commit

fixes #21726
上级 3ec6cc80
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册