diff --git a/CHANGELOG.md b/CHANGELOG.md index cf19fbb..fbe67ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed +- Fixes [#2342](https://github.com/gitkraken/vscode-gitlens/issues/2342) - Local remotes are incorrectly treated as private - Fixes [#2052](https://github.com/gitkraken/vscode-gitlens/issues/2052) - Interactive Rebase fails to start when using xonsh shell due to command quoting - Fixes [#2141](https://github.com/gitkraken/vscode-gitlens/issues/2141) - GitLens's rebase UI randomly fails loading interactive rebase when performed outside of VSC - Fixes [#1732](https://github.com/gitkraken/vscode-gitlens/issues/1732) - Phantom rebase-merge directory (`rm -rf ".git/rebase-merge"`) diff --git a/src/env/node/git/localGitProvider.ts b/src/env/node/git/localGitProvider.ts index b826749..cd7bfa2 100644 --- a/src/env/node/git/localGitProvider.ts +++ b/src/env/node/git/localGitProvider.ts @@ -478,13 +478,17 @@ export class LocalGitProvider implements GitProvider, Disposable { const remotes = await this.getRemotes(repoPath, { sort: true }); if (remotes.length === 0) return RepositoryVisibility.Local; + let local = true; for await (const result of fastestSettled(remotes.map(r => this.getRemoteVisibility(r)))) { if (result.status !== 'fulfilled') continue; if (result.value === RepositoryVisibility.Public) return RepositoryVisibility.Public; + if (result.value !== RepositoryVisibility.Local) { + local = false; + } } - return RepositoryVisibility.Private; + return local ? RepositoryVisibility.Local : RepositoryVisibility.Private; } @debug({ args: { 0: r => r.url } }) @@ -517,7 +521,7 @@ export class LocalGitProvider implements GitProvider, Disposable { return RepositoryVisibility.Private; } default: - return RepositoryVisibility.Private; + return maybeUri(remote.url) ? RepositoryVisibility.Private : RepositoryVisibility.Local; } }