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

Function add

packages/git/src/index.ts:9–16  ·  view source on GitHub ↗
(pathToFile: string, cwd: string)

Source from the content-addressed store, hash-verified

7import micromatch from "micromatch";
8
9export async function add(pathToFile: string, cwd: string) {
10 const gitCmd = await spawn("git", ["add", pathToFile], { cwd });
11
12 if (gitCmd.code !== 0) {
13 console.log(pathToFile, gitCmd.stderr.toString());
14 }
15 return gitCmd.code === 0;
16}
17
18export async function commit(message: string, cwd: string) {
19 const gitCmd = await spawn(

Callers 4

setupRepoAndCloneFunction · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.70
addFileAndCommitFunction · 0.70

Calls

no outgoing calls

Tested by 2

setupRepoAndCloneFunction · 0.72
addFileAndCommitFunction · 0.56