src/vs/workbench/contrib/scm/browser/scmViewService.ts/SCMViewService/getMaxSelectionIndex
class SCMViewService:	private getMaxSelectionIndex(): number {
		return this._repositories.length === 0 ? -1 :
			Math.max(...this._repositories.map(r => r.selectionIndex));
	}