Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions backend/src/routes/internal/repo-mirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ const PatchBodySchema = z.object({
directory: z.string().optional(),
})

const LEGACY_UPGRADE_MESSAGE = 'this ocm CLI is too old for this server; upgrade to ocm-cli >= 0.1.2 (the mirror upload protocol changed to chunked uploads)'
const LEGACY_MOVE_UPGRADE_MESSAGE = 'this ocm CLI is too old for this server; upgrade to ocm-cli >= 0.4.0 (/ocm-move now moves sessions into OpenCode worktrees)'

function gitRaw(repoPath: string, args: string[], env: NodeJS.ProcessEnv = process.env, input?: string): Promise<string> {
return new Promise((resolve, reject) => {
const child = spawn('git', args, { cwd: repoPath, env })
Expand Down Expand Up @@ -371,10 +368,6 @@ export function createInternalRepoMirrorRoutes(
) {
const app = new Hono()

app.post('/:repoId/mirror', (c) => {
return c.json({ error: 'cli_too_old', message: LEGACY_UPGRADE_MESSAGE }, 410)
})

app.post('/:repoId/mirror/begin', async (c) => {
const repoIdRaw = c.req.param('repoId')
const parsedBody = await parseJsonBody(c, BeginBodySchema, { invalidMessage: 'invalid json body' })
Expand Down Expand Up @@ -611,14 +604,6 @@ export function createInternalRepoMirrorRoutes(
}
})

app.get('/:repoId/mirror/target', (c) => {
return c.json({ error: 'cli_too_old', message: LEGACY_MOVE_UPGRADE_MESSAGE }, 410)
})

app.post('/:repoId/mirror/target', (c) => {
return c.json({ error: 'cli_too_old', message: LEGACY_MOVE_UPGRADE_MESSAGE }, 410)
})

app.get('/:repoId/mirror/checkouts', async (c) => {
const repoId = Number(c.req.param('repoId'))
if (!Number.isFinite(repoId)) return c.json({ error: 'invalid repoId' }, 400)
Expand Down
Loading