()
| 525 | } |
| 526 | |
| 527 | async function computeRemoteUrl(): Promise<string | null> { |
| 528 | const gitDir = await resolveGitDir() |
| 529 | if (!gitDir) { |
| 530 | return null |
| 531 | } |
| 532 | const url = await parseGitConfigValue(gitDir, 'remote', 'origin', 'url') |
| 533 | if (url) { |
| 534 | return url |
| 535 | } |
| 536 | // In worktrees, the config with remote URLs is in the common dir |
| 537 | const commonDir = await getCommonDir(gitDir) |
| 538 | if (commonDir && commonDir !== gitDir) { |
| 539 | return parseGitConfigValue(commonDir, 'remote', 'origin', 'url') |
| 540 | } |
| 541 | return null |
| 542 | } |
| 543 | |
| 544 | async function computeDefaultBranch(): Promise<string> { |
| 545 | const gitDir = await resolveGitDir() |
nothing calls this directly
no test coverage detected