Переглянути джерело

Fixes #2342 treats local remotes as local

main
Eric Amodio 2 роки тому
джерело
коміт
60816c2c5b
2 змінених файлів з 7 додано та 2 видалено
  1. +1
    -0
      CHANGELOG.md
  2. +6
    -2
      src/env/node/git/localGitProvider.ts

+ 1
- 0
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"`)

+ 6
- 2
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<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;
}
}

Завантаження…
Відмінити
Зберегти