MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getRepoRemoteHash

Function getRepoRemoteHash

source code/utils/git.ts:331–340  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

329 * - Does not expose the actual repository name in logs
330 */
331export 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
342export const getIsHeadOnRemote = async (): Promise<boolean> => {
343 const { code } = await execFileNoThrow(gitExe(), ['rev-parse', '@{u}'], {

Callers 3

getEventMetadataFunction · 0.85
doDownloadUserSettingsFunction · 0.85

Calls 2

getRemoteUrlFunction · 0.85
normalizeGitRemoteUrlFunction · 0.85

Tested by

no test coverage detected