mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
/ocm-move previously failed when the Manager checkout was dirty, behind, or on another branch. Choose the destination instead: replace in place only when the checkout is on the local branch, clean, and has nothing the local branch lacks; otherwise reuse an existing OpenCode worktree on that branch when it is equally safe; otherwise create a new OpenCode worktree through the same service the UI and multi-runs use, so it appears in the repo's worktree lists. The new worktree's branch is the local branch when free, else <branch>-ocm, -ocm-2 and so on. Server work is never discarded, the confirmation states the destination and why the main checkout was skipped, and a detached HEAD is refused. The mirror push endpoints (bundle upload and patch) accept a worktree directory, rejected unless it belongs to the repo, and a new endpoint creates the worktree. The old <repo>-<branch> path that registered a plain git worktree as a separate Manager repo is removed.