mirror of
https://github.com/stablyai/orca.git
synced 2026-10-03 08:02:12 +00:00
Prioritize workspace opening over replacement checkout preparation (#23013)
* Prioritize workspace opening over replacement checkout preparation * Preserve Git hook semantics and exercise preparation edge cases
This commit is contained in:
@@ -216,6 +216,7 @@ describeBinaryCompatibility('real Git binary compatibility', () => {
|
||||
})
|
||||
|
||||
it('supports prepared worktree creation and finalization', async () => {
|
||||
const head = (await runGit(['rev-parse', 'HEAD'])).stdout.trim()
|
||||
await runGit(['worktree', 'add', '--detach', '--no-checkout', 'compat-prepared', 'HEAD'])
|
||||
await runGit(['-C', 'compat-prepared', 'reset', '--hard', 'HEAD'])
|
||||
await runGit([
|
||||
@@ -234,12 +235,15 @@ describeBinaryCompatibility('real Git binary compatibility', () => {
|
||||
'--no-track',
|
||||
'-b',
|
||||
'compat-prepared-final',
|
||||
'HEAD'
|
||||
head
|
||||
])
|
||||
|
||||
await expect(runGit(['-C', 'compat-final', 'branch', '--show-current'])).resolves.toMatchObject(
|
||||
{ stdout: 'compat-prepared-final\n' }
|
||||
)
|
||||
await expect(runGit(['-C', 'compat-final', 'rev-parse', 'HEAD'])).resolves.toMatchObject({
|
||||
stdout: `${head}\n`
|
||||
})
|
||||
await runGit(['worktree', 'unlock', 'compat-final'])
|
||||
await runGit(['worktree', 'remove', '--force', 'compat-final'])
|
||||
await runGit(['branch', '-D', 'compat-prepared-final'])
|
||||
|
||||
Reference in New Issue
Block a user