Parcourir la source

Fixes #2281 hasRemote context when integrations are off

main
Eric Amodio il y a 2 ans
Parent
révision
dd5c3a996d
2 fichiers modifiés avec 7 ajouts et 4 suppressions
  1. +1
    -0
      CHANGELOG.md
  2. +6
    -4
      src/git/gitProviderService.ts

+ 1
- 0
CHANGELOG.md Voir le fichier

@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#2281](https://github.com/gitkraken/vscode-gitlens/issues/2281) - Push and Pull buttons missing from the commits view w/ integrations disabled
- Fixes [#2276](https://github.com/gitkraken/vscode-gitlens/issues/2276) - Search commit by Sha not working in Gitlens side bar
## [13.0.3] - 2022-10-20

+ 6
- 4
src/git/gitProviderService.ts Voir le fichier

@ -760,12 +760,14 @@ export class GitProviderService implements Disposable {
// Don't block for the remote context updates (because it can block other downstream requests during initialization)
async function updateRemoteContext(this: GitProviderService) {
const integrations = configuration.get('integrations.enabled');
let hasRemotes = false;
let hasRichRemotes = false;
let hasConnectedRemotes = false;
if (hasRepositories && configuration.get('integrations.enabled')) {
if (hasRepositories) {
for (const repo of this._repositories.values()) {
if (!hasConnectedRemotes) {
if (!hasConnectedRemotes && integrations) {
hasConnectedRemotes = await repo.hasRichRemote(true);
if (hasConnectedRemotes) {
@ -774,7 +776,7 @@ export class GitProviderService implements Disposable {
}
}
if (!hasRichRemotes) {
if (!hasRichRemotes && integrations) {
hasRichRemotes = await repo.hasRichRemote();
if (hasRichRemotes) {
@ -786,7 +788,7 @@ export class GitProviderService implements Disposable {
hasRemotes = await repo.hasRemotes();
}
if (hasRemotes && hasRichRemotes && hasConnectedRemotes) break;
if (hasRemotes && ((hasRichRemotes && hasConnectedRemotes) || !integrations)) break;
}
}

Chargement…
Annuler
Enregistrer