MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isValidGitSha

Function isValidGitSha

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

Source from the content-addressed store, hash-verified

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

Callers 2

readGitHeadFunction · 0.85
resolveRefInDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected