MCPcopy
hub / github.com/claude-code-best/claude-code / flattenSlug

Function flattenSlug

src/utils/worktree.ts:217–219  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

215// `+` is valid in git branch names and filesystem paths but NOT in the
216// slug-segment allowlist ([a-zA-Z0-9._-]), so the mapping is injective.
217function flattenSlug(slug: string): string {
218 return slug.replaceAll('/', '+')
219}
220
221export function worktreeBranchName(slug: string): string {
222 return `worktree-${flattenSlug(slug)}`

Callers 2

worktreeBranchNameFunction · 0.85
worktreePathForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected