mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
git: use different uris for quick diff
This commit is contained in:
@@ -32,7 +32,8 @@ export class GitContentProvider {
|
||||
constructor(private model: Model) {
|
||||
this.disposables.push(
|
||||
model.onDidChangeRepository(this.eventuallyFireChangeEvents, this),
|
||||
workspace.registerTextDocumentContentProvider('git', this)
|
||||
workspace.registerTextDocumentContentProvider('git', this),
|
||||
workspace.registerTextDocumentContentProvider('git-original', this)
|
||||
);
|
||||
|
||||
setInterval(() => this.cleanup(), FIVE_MINUTES);
|
||||
@@ -52,6 +53,10 @@ export class GitContentProvider {
|
||||
}
|
||||
|
||||
async provideTextDocumentContent(uri: Uri): Promise<string> {
|
||||
if (uri.scheme === 'git-original') {
|
||||
uri = new Uri().with({ scheme: 'git', path: uri.query });
|
||||
}
|
||||
|
||||
let ref = uri.query;
|
||||
|
||||
if (ref === '~') {
|
||||
|
||||
Reference in New Issue
Block a user