MCPcopy Create free account
hub / github.com/Noumena-Network/code / getRepoRemoteHash

Function getRepoRemoteHash

src/utils/git.ts:344–353  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

342 * - Does not expose the actual repository name in logs
343 */
344export 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
355export const getIsHeadOnRemote = async (): Promise<boolean> => {
356 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