src/vs/workbench/contrib/scm/common/scmService.ts/SCMService/registerSCMProvider
class SCMService:	registerSCMProvider(provider: ISCMProvider): ISCMRepository {
		this.logService.trace('SCMService#registerSCMProvider');

		if (this._repositories.has(provider.id)) {
			throw new Error(`SCM Provider ${provider.id} already exists.`);
		}

		const disposable = toDisposable(() => {
			this._repositories.delete(provider.id);
			this._onDidRemoveProvider.fire(repository);
			this.providerCount.set(this._repositories.size);
		});

		const repository = new SCMRepository(provider.id, provider, disposable, this.storageService);
		this._repositories.set(provider.id, repository);
		this._onDidAddProvider.fire(repository);

		this.providerCount.set(this._repositories.size);
		return repository;
	}