src/vs/workbench/contrib/scm/browser/scmViewService.ts/SCMViewService/constructor
class SCMViewService:	constructor(
		@ISCMService private readonly scmService: ISCMService,
		@IInstantiationService instantiationService: IInstantiationService,
		@IStorageService private readonly storageService: IStorageService,
		@IWorkspaceContextService workspaceContextService: IWorkspaceContextService
	) {
		this.menus = instantiationService.createInstance(SCMMenus);

		this._compareRepositories = (op1: ISCMRepository, op2: ISCMRepository): number => {
			const name1 = getRepositoryName(workspaceContextService, op1);
			const name2 = getRepositoryName(workspaceContextService, op2);

			const nameComparison = compareFileNames(name1, name2);
			if (nameComparison === 0 && op1.provider.rootUri && op2.provider.rootUri) {
				return comparePaths(op1.provider.rootUri.fsPath, op2.provider.rootUri.fsPath);
			}

			return nameComparison;
		};

		scmService.onDidAddRepository(this.onDidAddRepository, this, this.disposables);
		scmService.onDidRemoveRepository(this.onDidRemoveRepository, this, this.disposables);

		try {
			this.previousState = JSON.parse(storageService.get('scm:view:visibleRepositories', StorageScope.WORKSPACE, ''));
		} catch {
			// noop
		}

		for (const repository of scmService.repositories) {
			this.onDidAddRepository(repository);
		}

		storageService.onWillSaveState(this.onWillSaveState, this, this.disposables);
	}