(
baseRepoPathArg: string,
trunkBranch: string,
fetchedOrigin: boolean,
fallbackRef: string | null,
initLogger: InitLogger,
abortSignal?: AbortSignal
)
| 1571 | } |
| 1572 | |
| 1573 | private async resolveFreshWorkspaceSourceBase( |
| 1574 | baseRepoPathArg: string, |
| 1575 | trunkBranch: string, |
| 1576 | fetchedOrigin: boolean, |
| 1577 | fallbackRef: string | null, |
| 1578 | initLogger: InitLogger, |
| 1579 | abortSignal?: AbortSignal |
| 1580 | ): Promise<string> { |
| 1581 | if ( |
| 1582 | fetchedOrigin && |
| 1583 | (await this.remoteTrackingBranchExists(baseRepoPathArg, trunkBranch, abortSignal)) |
| 1584 | ) { |
| 1585 | return `origin/${trunkBranch}`; |
| 1586 | } |
| 1587 | |
| 1588 | const fallbackBase = fallbackRef ?? "HEAD"; |
| 1589 | initLogger.logStderr( |
| 1590 | `Note: origin/${trunkBranch} was not available on the remote host; using local snapshot ${fallbackBase}` |
| 1591 | ); |
| 1592 | return fallbackBase; |
| 1593 | } |
| 1594 | |
| 1595 | private async resolveLocalSyncRefManifest(projectPath: string): Promise<string | null> { |
| 1596 | try { |
no test coverage detected