MCPcopy Index your code
hub / github.com/changesets/changesets / getRepoRoot

Function getRepoRoot

packages/git/src/index.ts:173–185  ·  view source on GitHub ↗
({ cwd }: { cwd: string })

Source from the content-addressed store, hash-verified

171 await spawn("git", ["fetch", `--deepen=${by}`], { cwd });
172}
173async function getRepoRoot({ cwd }: { cwd: string }) {
174 const { stdout, code, stderr } = await spawn(
175 "git",
176 ["rev-parse", "--show-toplevel"],
177 { cwd }
178 );
179
180 if (code !== 0) {
181 throw new Error(stderr.toString());
182 }
183
184 return stdout.toString().trim().replace(/\n|\r/g, "");
185}
186
187export async function getChangedFilesSince({
188 cwd,

Callers 1

getChangedFilesSinceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected