MCPcopy Create free account
hub / github.com/backnotprop/plannotator / needsGitQuoting

Function needsGitQuoting

packages/shared/pr-github.ts:75–77  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

73// Pierre's filename regexes, code-nav's extractChangedFiles) expect git's
74// exact shape; over-quoting makes them misparse or silently drop files.
75function needsGitQuoting(p: string): boolean {
76 return /["\\\u0000-\u001F]/.test(p);
77}
78function headerPathToken(side: "a" | "b", p: string): string {
79 const full = `${side}/${p}`;
80 return needsGitQuoting(p) ? JSON.stringify(full) : full;

Callers 2

headerPathTokenFunction · 0.85
metadataPathTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected