MCPcopy Create free account
hub / github.com/anomalyco/opencode / statusForRepository

Function statusForRepository

packages/core/src/repository-cache.ts:232–236  ·  view source on GitHub ↗
(input: { reuse: boolean; refresh?: boolean; branchMatches?: boolean })

Source from the content-addressed store, hash-verified

230})
231
232function statusForRepository(input: { reuse: boolean; refresh?: boolean; branchMatches?: boolean }) {
233 if (!input.reuse) return "cloned" as const
234 if (input.branchMatches === false || input.refresh) return "refreshed" as const
235 return "cached" as const
236}
237
238function errorMessage(error: unknown) {
239 return error instanceof globalThis.Error ? error.message : String(error)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected