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