( baseRepoPathArg: string, revisionShell: string )
| 215 | } |
| 216 | |
| 217 | function buildBestEffortDetachBaseRepoHeadCommand( |
| 218 | baseRepoPathArg: string, |
| 219 | revisionShell: string |
| 220 | ): string { |
| 221 | return [ |
| 222 | // Resolve only the ref value here, not `<rev>^{commit}`: missing-object |
| 223 | // repair still belongs to the following worktree checkout, which produces |
| 224 | // richer errors and already has a retry path. |
| 225 | `head_oid=$(git -C ${baseRepoPathArg} rev-parse --verify ${revisionShell} 2>/dev/null || true)`, |
| 226 | `if [ -n "$head_oid" ]; then git --git-dir=${baseRepoPathArg} update-ref --no-deref HEAD "$head_oid" 2>/dev/null || true; fi`, |
| 227 | ].join("\n"); |
| 228 | } |
| 229 | |
| 230 | function logSSHBackoffWait(initLogger: InitLogger, waitMs: number): void { |
| 231 | const secs = Math.max(1, Math.ceil(waitMs / 1000)); |
no outgoing calls
no test coverage detected