mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
* fix(git): cache unsupported capabilities per host Old Git worktree, ref-search, and merge-tree fallbacks retried unsupported flags on recurring operations, flooding subprocess traces. Centralize capability probing per native, WSL, and SSH execution host, coalesce concurrent probes, and retry periodically for in-place Git upgrades. * fix(git): recognize real old-Git merge-tree rejection * test(git): enforce real binary compatibility matrix * fix(ci): preserve Git compatibility test ownership * fix(git): retain supported capability state
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
isUnsupportedMergeTreeMergeBaseError,
|
|
isUnsupportedMergeTreeWriteTreeError
|
|
} from './git-merge-tree-capability'
|
|
|
|
describe('isUnsupportedMergeTreeWriteTreeError', () => {
|
|
it.each([
|
|
{ stderr: 'fatal: unknown rev --write-tree' },
|
|
{ stdout: 'usage: git merge-tree <base-tree> <branch1> <branch2>' },
|
|
new Error("error: unknown option 'write-tree'")
|
|
])('recognizes old-Git write-tree rejection shapes', (error) => {
|
|
expect(isUnsupportedMergeTreeWriteTreeError(error)).toBe(true)
|
|
})
|
|
|
|
it('does not classify an ordinary merge failure as unsupported', () => {
|
|
expect(
|
|
isUnsupportedMergeTreeWriteTreeError({
|
|
stderr: 'fatal: refusing to merge unrelated histories'
|
|
})
|
|
).toBe(false)
|
|
})
|
|
|
|
it('recognizes only an unsupported merge-base option', () => {
|
|
expect(
|
|
isUnsupportedMergeTreeMergeBaseError({
|
|
stderr: "error: unknown option `merge-base'"
|
|
})
|
|
).toBe(true)
|
|
expect(isUnsupportedMergeTreeMergeBaseError({ stderr: 'fatal: merge-base failed' })).toBe(false)
|
|
})
|
|
})
|