瀏覽代碼

Fixes #2281 hasRemote context when integrations are off

main
Eric Amodio 2 年之前
父節點
當前提交
dd5c3a996d
共有 2 個檔案被更改,包括 7 行新增4 行删除
  1. +1
    -0
      CHANGELOG.md
  2. +6
    -4
      src/git/gitProviderService.ts

+ 1
- 0
CHANGELOG.md 查看文件

@ -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 查看文件

@ -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;
}
}

Loading…
取消
儲存