Browse Source

Fixes invalid config scopes

main
Eric Amodio 2 years ago
parent
commit
258418fbfb
3 changed files with 5 additions and 4 deletions
  1. +0
    -1
      src/env/node/git/localGitProvider.ts
  2. +1
    -1
      src/git/gitProviderService.ts
  3. +4
    -2
      src/git/models/repository.ts

+ 0
- 1
src/env/node/git/localGitProvider.ts View File

@ -343,7 +343,6 @@ export class LocalGitProvider implements GitProvider, Disposable {
const autoRepositoryDetection =
configuration.getAny<boolean | 'subFolders' | 'openEditors'>(
CoreGitConfiguration.AutoRepositoryDetection,
uri,
) ?? true;
const folder = workspace.getWorkspaceFolder(uri);

+ 1
- 1
src/git/gitProviderService.ts View File

@ -1831,7 +1831,7 @@ export class GitProviderService implements Disposable {
let isDirectory: boolean | undefined;
detectNested = detectNested ?? configuration.get('detectNestedRepositories');
detectNested = detectNested ?? configuration.get('detectNestedRepositories', uri);
if (!detectNested) {
if (repository != null) return repository;
} else if (this._visitedPaths.has(path)) {

+ 4
- 2
src/git/models/repository.ts View File

@ -286,7 +286,9 @@ export class Repository implements Disposable {
private onConfigurationChanged(e?: ConfigurationChangeEvent) {
if (configuration.changed(e, 'remotes', this.folder?.uri)) {
this._providers = RemoteProviderFactory.loadProviders(configuration.get('remotes', this.folder?.uri));
this._providers = RemoteProviderFactory.loadProviders(
configuration.get('remotes', this.folder?.uri ?? null),
);
if (e != null) {
this.resetCaches('remotes');
@ -573,7 +575,7 @@ export class Repository implements Disposable {
async getRemotes(options?: { filter?: (remote: GitRemote) => boolean; sort?: boolean }): Promise<GitRemote[]> {
if (this._remotes == null) {
if (this._providers == null) {
const remotesCfg = configuration.get('remotes', this.folder?.uri);
const remotesCfg = configuration.get('remotes', this.folder?.uri ?? null);
this._providers = RemoteProviderFactory.loadProviders(remotesCfg);
}

Loading…
Cancel
Save