MCPcopy Create free account
hub / github.com/Wirasm/kild / worktreeRef

Function worktreeRef

engine/src/kild/worktree.ts:38–41  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

36 * `realpathSync` alone cannot do it: the path often does not exist yet (it is about to be
37 * created). So resolve the longest prefix that does exist and rebuild the rest onto it.
38 */
39export function canonicalPath(p: string): string {
40 try {
41 return realpathSync(p);
42 } catch {
43 const parent = path.dirname(p);
44 // At the filesystem root `dirname` is a fixed point; stop rather than recurse forever.

Callers 5

spawnMethod · 0.90
worktree.test.tsFile · 0.90
sessions.test.tsFile · 0.90
createWorktreeFunction · 0.85
ensureWorktreeFunction · 0.85

Calls 1

assertSafeBranchFunction · 0.85

Tested by

no test coverage detected