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

Function isValidGitSha

source code/utils/git/gitFilesystem.ts:131–133  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

129 * could otherwise return arbitrary content that flows into shell contexts.
130 */
131export function isValidGitSha(s: string): boolean {
132 return /^[0-9a-f]{40}$/.test(s) || /^[0-9a-f]{64}$/.test(s)
133}
134
135// ---------------------------------------------------------------------------
136// readGitHead — parse .git/HEAD

Callers 2

readGitHeadFunction · 0.85
resolveRefInDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected