mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
- Answer the old /mirror/target routes with a 410 upgrade message and serve the lookup at GET /mirror/checkouts; detect older Managers via the token probe (MANAGER_FEATURE_MISSING). - Create the move worktree and import the bundle in one call; worktree setup runs after the import and the worktree is removed on failure. - Never rewind a server branch: suffix the new worktree branch when the server branch has commits the local branch lacks, and skip both the source and target branch when updating refs. - Reuse clean <branch>-ocm[-N] worktrees and legacy worktree repo rows instead of creating new ones on every move. - Let ocm push/pull target the worktree on the local branch via a directory parameter on the mirror read routes; no tarball fallback for worktrees. - Share one sibling loader (listRepoSiblings), validate branch names, compare canonical paths in isDirectoryInUse, and cut redundant git work in the checkouts lookup and the CLI destination choice.