MCPcopy Create free account
hub / github.com/Noumena-Network/code / flattenSlug

Function flattenSlug

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

Source from the content-addressed store, hash-verified

227// `+` is valid in git branch names and filesystem paths but NOT in the
228// slug-segment allowlist ([a-zA-Z0-9._-]), so the mapping is injective.
229function flattenSlug(slug: string): string {
230 return slug.replaceAll('/', '+')
231}
232
233export function worktreeBranchName(slug: string): string {
234 return `worktree-${flattenSlug(slug)}`

Callers 2

worktreeBranchNameFunction · 0.85
worktreePathForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected