git: implement API

This commit is contained in:
Joao Moreno
2018-08-24 12:04:29 +02:00
parent 28d2b5d2d6
commit 103715c3cc
5 changed files with 238 additions and 17 deletions

View File

@@ -92,7 +92,11 @@ export class GitContentProvider {
return '';
}
return await repository.diff(path, ref === 'index');
if (ref === 'index') {
return await repository.diffIndexWithHEAD(path);
} else {
return await repository.diffWithHEAD(path);
}
}
const repository = this.model.getRepository(uri);