diff --git a/CHANGELOG.md b/CHANGELOG.md index 738a27e..c75ca36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## Fixed +- Fixes [#1936](https://github.com/gitkraken/vscode-gitlens/issues/1936) - Broken repositories view - Fixes [#1882](https://github.com/gitkraken/vscode-gitlens/issues/1882) - Blame annotations not showing anymore after update - Fixes [#1787](https://github.com/gitkraken/vscode-gitlens/issues/1787) - Remove '-review' from Gerrit Remote reviewDomain() — thanks to [PR #1954](https://github.com/gitkraken/vscode-gitlens/pull/1954) by Felipe Santos ([@felipecrs](https://github.com/felipecrs)) - Fixes [#1902](https://github.com/gitkraken/vscode-gitlens/issues/1902) - Support replacing mirror/replica domain with main domain for remote provider — thanks to [PR #1954](https://github.com/gitkraken/vscode-gitlens/pull/1954) by Felipe Santos ([@felipecrs](https://github.com/felipecrs)) diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index e0abcfb..c7a8b07 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -564,10 +564,11 @@ export class GitProviderService implements Disposable { this: GitProviderService, repoPath: string | Uri, plan: FreeSubscriptionPlans, + force: boolean = false, ): Promise { const { path: cacheKey } = this.getProvider(repoPath); - let access = this._accessCache.get(cacheKey); + let access = force ? undefined : this._accessCache.get(cacheKey); if (access == null) { access = this.visibility(repoPath).then(visibility => { if (visibility !== RepositoryVisibility.Private) { @@ -628,7 +629,8 @@ export class GitProviderService implements Disposable { : { allowed: false, subscription: { current: subscription, required: requiredPlan } }; } - return getRepoAccess.call(this, repoPath, plan); + // Pass force = true to bypass the cache and avoid a promise loop (where we used the cached promise we just created to try to resolve itself 🤦) + return getRepoAccess.call(this, repoPath, plan, true); } async ensureAccess(feature: PlusFeatures, repoPath?: string): Promise {