MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / getGitRelativePath

Function getGitRelativePath

projects/electron/src/modules/code/files.ts:161–164  ·  view source on GitHub ↗

* Get the relative path from git root to dir

(dir: string)

Source from the content-addressed store, hash-verified

159 * Get the relative path from git root to dir
160 */
161async function getGitRelativePath(dir: string): Promise<string> {
162 const result = await execCmd("git", ["rev-parse", "--show-prefix"], dir)
163 return result.success ? result.stdout.trim().replace(/\/$/, "") : ""
164}
165
166/**
167 * List files using git ls-files

Callers 1

listFilesWithGitFunction · 0.85

Calls 2

execCmdFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected