Reduce Git refresh subprocess fanout (#6324)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Brennan Benson
2026-06-25 13:00:44 -07:00
committed by GitHub
co-authored by Orca
parent ca1cea2558
commit c10b77d160
10 changed files with 1608 additions and 149 deletions
@@ -0,0 +1,16 @@
export function isStableMissingGitRemoteError(error: unknown): boolean {
const parts: string[] = []
if (error instanceof Error) {
parts.push(error.message)
}
if (typeof error === 'object' && error !== null && 'stderr' in error) {
const stderr = (error as { stderr?: unknown }).stderr
if (typeof stderr === 'string') {
parts.push(stderr)
}
}
if (parts.length === 0) {
parts.push(String(error))
}
return /no such remote/i.test(parts.join('\n'))
}