mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 17:37:40 +00:00
* fix: reduce worktree deletion branch cleanup overhead Refresh only the remote base branches needed to prove a branch merged, with automatic maintenance disabled. Skip merge simulation when no common ancestor is available and preserve the branch when its remote base cannot be refreshed. * fix: preserve fetch mappings and live branch cleanup fallbacks * fix: spawn macOS worktree deletion commands off the main thread
38 lines
1.5 KiB
TypeScript
38 lines
1.5 KiB
TypeScript
// Why: cap execFile output to prevent an uncatchable V8 string overflow; match relay MAX_GIT_BUFFER.
|
|
export const DEFAULT_GIT_MAX_BUFFER = 10 * 1024 * 1024
|
|
|
|
// Why: the admission tier is a wire value, so it is declared with its params schema.
|
|
import type { GitAdmissionTier } from '../../../shared/rpc-contract/git-admission-tier-params'
|
|
|
|
export type { GitAdmissionTier }
|
|
|
|
export type GitExecOptions = {
|
|
cwd: string
|
|
encoding?: BufferEncoding | 'buffer'
|
|
maxBuffer?: number
|
|
timeout?: number
|
|
/** Overrides only the default read deadline in tests; explicit timeout still wins. */
|
|
timeoutMsForTest?: number
|
|
stdin?: string
|
|
env?: NodeJS.ProcessEnv
|
|
signal?: AbortSignal
|
|
/** Cancels admission only; a running child still finishes. */
|
|
admissionSignal?: AbortSignal
|
|
/** Rechecks owner eligibility after admission, before starting the child. */
|
|
canStart?: () => boolean
|
|
wslDistro?: string
|
|
preferWslDirectGit?: boolean
|
|
useConfiguredSshCommandForNetwork?: boolean
|
|
terminationBarrier?: boolean
|
|
captureWslLoginShellOutput?: boolean
|
|
/** Scheduler priority for this child; status is the safe default. */
|
|
admissionTier?: GitAdmissionTier
|
|
/** Skips general admission; only for a caller that bounds its own concurrency (worktree deletes). */
|
|
admissionExempt?: true
|
|
/** Native macOS deletion spawns use the shared process worker. */
|
|
spawnOnWorkerThread?: boolean
|
|
/** Sees each stderr chunk as it arrives; capture and errors are unchanged. Not
|
|
* supported with `terminationBarrier`. */
|
|
onStderr?: (chunk: string) => void
|
|
}
|