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

Function matchesGitInternalPrefix

src/tools/PowerShellTool/gitSafety.ts:124–132  ·  view source on GitHub ↗
(n: string)

Source from the content-addressed store, hash-verified

122}
123
124function matchesGitInternalPrefix(n: string): boolean {
125 if (n === 'head' || n === '.git') return true
126 if (n.startsWith('.git/') || /^git~\d+($|\/)/.test(n)) return true
127 for (const p of GIT_INTERNAL_PREFIXES) {
128 if (p === 'head') continue
129 if (n === p || n.startsWith(p + '/')) return true
130 }
131 return false
132}
133
134/**
135 * True if arg (raw PS arg text) resolves to a git-internal path in cwd.

Callers 1

isGitInternalPathPSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected