Bladeren bron

Fixes #2342 treats local remotes as local

main
Eric Amodio 2 jaren geleden
bovenliggende
commit
60816c2c5b
2 gewijzigde bestanden met toevoegingen van 7 en 2 verwijderingen
  1. +1
    -0
      CHANGELOG.md
  2. +6
    -2
      src/env/node/git/localGitProvider.ts

+ 1
- 0
CHANGELOG.md Bestand weergeven

@ -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"`)

+ 6
- 2
src/env/node/git/localGitProvider.ts Bestand weergeven

@ -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<LocalGitProvider['getRemoteVisibility']>({ 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;
}
}

Laden…
Annuleren
Opslaan