diff --git a/src/env/node/git/localGitProvider.ts b/src/env/node/git/localGitProvider.ts index a55285c..bb28bc8 100644 --- a/src/env/node/git/localGitProvider.ts +++ b/src/env/node/git/localGitProvider.ts @@ -161,7 +161,7 @@ import { splitPath, } from '../../../system/path'; import type { PromiseOrValue } from '../../../system/promise'; -import { any, fastestSettled, getSettledValue } from '../../../system/promise'; +import { any, asSettled, getSettledValue } from '../../../system/promise'; import { equalsIgnoreCase, getDurationMilliseconds, interpolate, splitSingle } from '../../../system/string'; import { PathTrie } from '../../../system/trie'; import { compare, fromString } from '../../../system/version'; @@ -520,7 +520,7 @@ export class LocalGitProvider implements GitProvider, Disposable { if (remotes.length === 0) return [RepositoryVisibility.Local, undefined]; let local = true; - for await (const result of fastestSettled(remotes.map(r => this.getRemoteVisibility(r)))) { + for await (const result of asSettled(remotes.map(r => this.getRemoteVisibility(r)))) { if (result.status !== 'fulfilled') continue; if (result.value[0] === RepositoryVisibility.Public) { diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index f9436b1..96bc2ed 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -34,7 +34,7 @@ import { count, filter, first, flatMap, join, map, some } from '../system/iterab import { Logger } from '../system/logger'; import { getLogScope, setLogScopeExit } from '../system/logger.scope'; import { getBestPath, getScheme, isAbsolute, maybeUri, normalizePath } from '../system/path'; -import { cancellable, fastestSettled, getSettledValue, isPromise, PromiseCancelledError } from '../system/promise'; +import { asSettled, cancellable, getSettledValue, isPromise, PromiseCancelledError } from '../system/promise'; import { VisitedPathsTrie } from '../system/trie'; import type { GitCaches, @@ -923,7 +923,7 @@ export class GitProviderService implements Disposable { let isPrivate = false; let isLocal = false; - for await (const result of fastestSettled(repositories.map(r => getRepoVisibility.call(this, r.path)))) { + for await (const result of asSettled(repositories.map(r => getRepoVisibility.call(this, r.path)))) { if (result.status !== 'fulfilled') continue; if (result.value === RepositoryVisibility.Public) { diff --git a/src/plus/github/githubGitProvider.ts b/src/plus/github/githubGitProvider.ts index 3d21800..c61f119 100644 --- a/src/plus/github/githubGitProvider.ts +++ b/src/plus/github/githubGitProvider.ts @@ -85,7 +85,7 @@ import { Logger } from '../../system/logger'; import type { LogScope } from '../../system/logger.scope'; import { getLogScope } from '../../system/logger.scope'; import { isAbsolute, isFolderGlob, maybeUri, normalizePath, relative } from '../../system/path'; -import { fastestSettled, getSettledValue } from '../../system/promise'; +import { asSettled, getSettledValue } from '../../system/promise'; import { serializeWebviewItemContext } from '../../system/webview'; import type { CachedBlame, CachedLog } from '../../trackers/gitDocumentTracker'; import { GitDocumentState } from '../../trackers/gitDocumentTracker'; @@ -238,7 +238,7 @@ export class GitHubGitProvider implements GitProvider, Disposable { const remotes = await this.getRemotes(repoPath, { sort: true }); if (remotes.length === 0) return [RepositoryVisibility.Local, undefined]; - for await (const result of fastestSettled(remotes.map(r => this.getRemoteVisibility(r)))) { + for await (const result of asSettled(remotes.map(r => this.getRemoteVisibility(r)))) { if (result.status !== 'fulfilled') continue; if (result.value[0] === RepositoryVisibility.Public) { diff --git a/src/system/promise.ts b/src/system/promise.ts index fa208c0..8cf5194 100644 --- a/src/system/promise.ts +++ b/src/system/promise.ts @@ -32,7 +32,7 @@ export function any(...promises: Promise[]): Promise { }); } -export async function* fastestSettled(promises: Promise[]): AsyncIterable> { +export async function* asSettled(promises: Promise[]): AsyncIterable> { const map = new Map( promises.map((promise, i) => [ i,