()
| 510 | } |
| 511 | |
| 512 | async function computeHead(): Promise<string> { |
| 513 | const gitDir = await resolveGitDir() |
| 514 | if (!gitDir) { |
| 515 | return '' |
| 516 | } |
| 517 | const head = await readGitHead(gitDir) |
| 518 | if (!head) { |
| 519 | return '' |
| 520 | } |
| 521 | if (head.type === 'branch') { |
| 522 | return (await resolveRef(gitDir, `refs/heads/${head.name}`)) ?? '' |
| 523 | } |
| 524 | return head.sha |
| 525 | } |
| 526 | |
| 527 | async function computeRemoteUrl(): Promise<string | null> { |
| 528 | const gitDir = await resolveGitDir() |
nothing calls this directly
no test coverage detected