Function
statusForRepository
(input: { reuse: boolean; refresh?: boolean; branchMatches?: boolean })
Source from the content-addressed store, hash-verified
| 230 | }) |
| 231 | |
| 232 | function 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 | |
| 238 | function errorMessage(error: unknown) { |
| 239 | return error instanceof globalThis.Error ? error.message : String(error) |
Tested by
no test coverage detected