mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-24 19:56:38 +00:00
SCM - quick diff should better handle untracked files (#236315)
This commit is contained in:
@@ -1035,7 +1035,13 @@ export class Repository implements Disposable {
|
||||
}
|
||||
|
||||
// Ignore path that is inside a merge group
|
||||
if (this.mergeGroup.resourceStates.some(r => r.resourceUri.path === uri.path)) {
|
||||
if (this.mergeGroup.resourceStates.some(r => pathEquals(r.resourceUri.fsPath, uri.fsPath))) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Ignore path that is untracked
|
||||
if (this.untrackedGroup.resourceStates.some(r => pathEquals(r.resourceUri.path, uri.path)) ||
|
||||
this.workingTreeGroup.resourceStates.some(r => pathEquals(r.resourceUri.path, uri.path) && r.type === Status.UNTRACKED)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -214,10 +214,6 @@ export class QuickDiffModel extends Disposable {
|
||||
return; // disposed
|
||||
}
|
||||
|
||||
if (editorModels.every(editorModel => editorModel.textEditorModel.getValueLength() === 0)) {
|
||||
result.changes = [];
|
||||
}
|
||||
|
||||
this.setChanges(result.changes, result.mapChanges);
|
||||
})
|
||||
.catch(err => onUnexpectedError(err));
|
||||
|
||||
Reference in New Issue
Block a user