MCPcopy
hub / github.com/codeaashu/claude-code / getRepoRemoteHash

Function getRepoRemoteHash

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

Source from the content-addressed store, hash-verified

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

Callers 3

getEventMetadataFunction · 0.85
doDownloadUserSettingsFunction · 0.85

Calls 3

getRemoteUrlFunction · 0.85
normalizeGitRemoteUrlFunction · 0.85
updateMethod · 0.65

Tested by

no test coverage detected