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