dirty diff doesn't clear on commit

fixes #21726
This commit is contained in:
Joao Moreno
2017-03-02 10:02:10 +01:00
parent 3ec6cc807d
commit e66408abc8

View File

@@ -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;