()
| 342 | * - Does not expose the actual repository name in logs |
| 343 | */ |
| 344 | export async function getRepoRemoteHash(): Promise<string | null> { |
| 345 | const remoteUrl = await getRemoteUrl() |
| 346 | if (!remoteUrl) return null |
| 347 | |
| 348 | const normalized = normalizeGitRemoteUrl(remoteUrl) |
| 349 | if (!normalized) return null |
| 350 | |
| 351 | const hash = createHash('sha256').update(normalized).digest('hex') |
| 352 | return hash.substring(0, 16) |
| 353 | } |
| 354 | |
| 355 | export const getIsHeadOnRemote = async (): Promise<boolean> => { |
| 356 | const { code } = await execFileNoThrow(gitExe(), ['rev-parse', '@{u}'], { |
no test coverage detected