MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / realpath

Function realpath

src/sync/worktree.ts:152–158  ·  view source on GitHub ↗

Resolve symlinks where possible so tmp/realpath quirks don't break equality.

(p: string)

Source from the content-addressed store, hash-verified

150
151/** Resolve symlinks where possible so tmp/realpath quirks don't break equality. */
152function realpath(p: string): string {
153 try {
154 return fs.realpathSync(path.resolve(p));
155 } catch {
156 return path.resolve(p);
157 }
158}

Callers 3

gitWorktreeRootFunction · 0.85
gitCommonDirFunction · 0.85

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected