Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCM - remove diffIdentityProvider #199745

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 3 additions & 12 deletions src/vs/workbench/contrib/scm/browser/scmViewPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2515,7 +2515,6 @@ export class SCMViewPane extends ViewPane {
private treeScrollTop: number | undefined;
private treeContainer!: HTMLElement;
private tree!: WorkbenchCompressibleAsyncDataTree<ISCMViewService, TreeElement, FuzzyScore>;
private treeIdentityProvider!: IIdentityProvider<TreeElement>;

private listLabels!: ResourceLabels;
private inputRenderer!: InputRenderer;
Expand Down Expand Up @@ -2759,8 +2758,6 @@ export class SCMViewPane extends ViewPane {
const treeDataSource = this.instantiationService.createInstance(SCMTreeDataSource, () => this.viewMode, () => this.alwaysShowRepositories, () => this.showActionButton, () => this.showIncomingChanges, () => this.showOutgoingChanges);
this.disposables.add(treeDataSource);

this.treeIdentityProvider = new SCMResourceIdentityProvider();

this.tree = this.instantiationService.createInstance(
WorkbenchCompressibleAsyncDataTree,
'SCM Tree Repo',
Expand All @@ -2785,7 +2782,7 @@ export class SCMViewPane extends ViewPane {
transformOptimization: false,
filter: new SCMTreeFilter(),
dnd: new SCMTreeDragAndDrop(this.instantiationService),
identityProvider: this.treeIdentityProvider,
identityProvider: new SCMResourceIdentityProvider(),
sorter: new SCMTreeSorter(() => this.viewMode, () => this.viewSortKey),
keyboardNavigationLabelProvider: this.instantiationService.createInstance(SCMTreeKeyboardNavigationLabelProvider, () => this.viewMode),
overrideStyles: {
Expand Down Expand Up @@ -3113,16 +3110,10 @@ export class SCMViewPane extends ViewPane {

if (element && this.tree.hasNode(element)) {
// Refresh specific repository
await this.tree.updateChildren(element, true, false, {
diffDepth: Infinity,
diffIdentityProvider: this.treeIdentityProvider
});
await this.tree.updateChildren(element);
} else {
// Refresh the entire tree
await this.tree.updateChildren(undefined, true, false, {
diffDepth: Infinity,
diffIdentityProvider: this.treeIdentityProvider
});
await this.tree.updateChildren(undefined);
}

if (focusedInput) {
Expand Down