Eric Amodio 7 vuotta sitten
vanhempi
commit
db4b53f5c7
2 muutettua tiedostoa jossa 7 lisäystä ja 29 poistoa
  1. +1
    -3
      src/git/models/repository.ts
  2. +6
    -26
      src/gitService.ts

+ 1
- 3
src/git/models/repository.ts Näytä tiedosto

@ -126,9 +126,7 @@ export class Repository extends Disposable {
const section = configuration.name('remotes').value; const section = configuration.name('remotes').value;
if (initializing || configuration.changed(e, section, this.folder.uri)) { 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<IRemotesConfig[] | null | undefined>(section, this.folder.uri));
this._providerMap = undefined;
this._providerMap = RemoteProviderFactory.createMap(configuration.get<IRemotesConfig[] | null | undefined>(section, this.folder.uri));
if (!initializing) { if (!initializing) {
this._remotes = undefined; this._remotes = undefined;

+ 6
- 26
src/gitService.ts Näytä tiedosto

@ -281,34 +281,14 @@ export class GitService extends Disposable {
repositories.push(new Repository(folder, rootPath, true, this, anyRepoChangedFn, this._suspended)); 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<number>(configuration.name('advanced')('repositorySearchDepth').value, folderUri);
}
catch (ex) {
Logger.error(ex);
depth = configuration.get<number>(configuration.name('advanced')('repositorySearchDepth').value, null);
}
const depth = configuration.get<number>(configuration.name('advanced')('repositorySearchDepth').value, folderUri);
if (depth <= 0) return repositories; 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]) => { const excludedPaths = [...Iterables.filterMap(Objects.entries(excludes), ([key, value]) => {
if (!value) return undefined; if (!value) return undefined;

Ladataan…
Peruuta
Tallenna