mirror of
https://github.com/stablyai/orca.git
synced 2026-10-03 16:02:11 +00:00
* Split speech session lifecycle * Split terminal output scheduler pipeline * Split mobile browser pane modules * Prune resolved max-lines suppressions * Split pane tree equalization logic * Extract mobile troubleshoot screen styles * Split external automation manager * Split main window service attachments * Split hosted review creation checks * Split automation dispatch event handling * Split settings navigation metadata * Split daemon initialization lifecycle * Split GitLab item dialog * Split relay dispatcher layers * Split mobile host screen * Retarget mobile view settings source test * Split runtime file client layers * Split ports panel layers * Split runtime environments pane layers * Split local PTY provider responsibilities * Split CDP bridge responsibilities * Split relay Git handler responsibilities * Track moved relay Git fetch audit * Split Linear item drawer responsibilities * Split telemetry event schema responsibilities * Split resource usage status responsibilities * Split remote terminal multiplexer responsibilities * Split Git worktree responsibilities * Fix F3-speech for #17123 * Fix F1-cycle for #17131 * Fix F4-navtest for #17157 * Fix F2-allowlist for #17161
24 lines
806 B
TypeScript
24 lines
806 B
TypeScript
import { gitExecFileAsync } from './runner'
|
|
import { runWithGitReadCacheInvalidation } from './status'
|
|
import { bumpWorktreeScanGeneration } from './worktree-scan-cache'
|
|
|
|
/**
|
|
* Move a worktree with `git worktree move` (not `fs.rename`, which corrupts the
|
|
* `.git` file and the `.git/worktrees/<name>/gitdir` back-pointer). Local-only,
|
|
* so there is no relay parity handler. Caller owns migrating Orca's
|
|
* path-derived worktree identity and pre-checks that the destination is free.
|
|
*/
|
|
export async function moveWorktree(
|
|
repoPath: string,
|
|
oldPath: string,
|
|
newPath: string
|
|
): Promise<void> {
|
|
try {
|
|
await runWithGitReadCacheInvalidation(() =>
|
|
gitExecFileAsync(['worktree', 'move', oldPath, newPath], { cwd: repoPath })
|
|
)
|
|
} finally {
|
|
bumpWorktreeScanGeneration(repoPath)
|
|
}
|
|
}
|