src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.ts/SCMRepositoriesViewPane/updateListSelection
class SCMRepositoriesViewPane:	private updateListSelection(): void {
		const set = new Set();

		for (const repository of this.scmViewService.visibleRepositories) {
			set.add(repository);
		}

		const selection: number[] = [];

		for (let i = 0; i < this.list.length; i++) {
			if (set.has(this.list.element(i))) {
				selection.push(i);
			}
		}

		this.list.setSelection(selection);

		if (selection.length > 0) {
			this.list.setAnchor(selection[0]);
			this.list.setFocus([selection[0]]);
		}
	}