From db4b53f5c7e1889f55572ebc79a16693a55507d8 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sat, 16 Dec 2017 02:13:47 -0500 Subject: [PATCH] Removes workaround for https://github.com/Microsoft/vscode/issues/38229 --- src/git/models/repository.ts | 4 +--- src/gitService.ts | 32 ++++++-------------------------- 2 files changed, 7 insertions(+), 29 deletions(-) diff --git a/src/git/models/repository.ts b/src/git/models/repository.ts index da320ca..05fea1c 100644 --- a/src/git/models/repository.ts +++ b/src/git/models/repository.ts @@ -126,9 +126,7 @@ export class Repository extends Disposable { const section = configuration.name('remotes').value; if (initializing || configuration.changed(e, section, this.folder.uri)) { - // Can't reset the provider map here because of https://github.com/Microsoft/vscode/issues/38229 - // this._providerMap = RemoteProviderFactory.createMap(configuration.get(section, this.folder.uri)); - this._providerMap = undefined; + this._providerMap = RemoteProviderFactory.createMap(configuration.get(section, this.folder.uri)); if (!initializing) { this._remotes = undefined; diff --git a/src/gitService.ts b/src/gitService.ts index 706cd71..d83a4ed 100644 --- a/src/gitService.ts +++ b/src/gitService.ts @@ -281,34 +281,14 @@ export class GitService extends Disposable { repositories.push(new Repository(folder, rootPath, true, this, anyRepoChangedFn, this._suspended)); } - // Can remove this try/catch once https://github.com/Microsoft/vscode/issues/38229 is fixed - let depth; - try { - depth = configuration.get(configuration.name('advanced')('repositorySearchDepth').value, folderUri); - } - catch (ex) { - Logger.error(ex); - depth = configuration.get(configuration.name('advanced')('repositorySearchDepth').value, null); - } - + const depth = configuration.get(configuration.name('advanced')('repositorySearchDepth').value, folderUri); if (depth <= 0) return repositories; - // Can remove this try/catch once https://github.com/Microsoft/vscode/issues/38229 is fixed - let excludes = {}; - try { - // Get any specified excludes -- this is a total hack, but works for some simple cases and something is better than nothing :) - excludes = { - ...workspace.getConfiguration('files', folderUri).get<{ [key: string]: boolean }>('exclude', {}), - ...workspace.getConfiguration('search', folderUri).get<{ [key: string]: boolean }>('exclude', {}) - }; - } - catch (ex) { - Logger.error(ex); - excludes = { - ...workspace.getConfiguration('files', null!).get<{ [key: string]: boolean }>('exclude', {}), - ...workspace.getConfiguration('search', null!).get<{ [key: string]: boolean }>('exclude', {}) - }; - } + // Get any specified excludes -- this is a total hack, but works for some simple cases and something is better than nothing :) + let excludes = { + ...workspace.getConfiguration('files', folderUri).get<{ [key: string]: boolean }>('exclude', {}), + ...workspace.getConfiguration('search', folderUri).get<{ [key: string]: boolean }>('exclude', {}) + }; const excludedPaths = [...Iterables.filterMap(Objects.entries(excludes), ([key, value]) => { if (!value) return undefined;