()
| 329 | * - Does not expose the actual repository name in logs |
| 330 | */ |
| 331 | export async function getRepoRemoteHash(): Promise<string | null> { |
| 332 | const remoteUrl = await getRemoteUrl() |
| 333 | if (!remoteUrl) return null |
| 334 | |
| 335 | const normalized = normalizeGitRemoteUrl(remoteUrl) |
| 336 | if (!normalized) return null |
| 337 | |
| 338 | const hash = createHash('sha256').update(normalized).digest('hex') |
| 339 | return hash.substring(0, 16) |
| 340 | } |
| 341 | |
| 342 | export const getIsHeadOnRemote = async (): Promise<boolean> => { |
| 343 | const { code } = await execFileNoThrow(gitExe(), ['rev-parse', '@{u}'], { |
no test coverage detected