MCPcopy Create free account
hub / github.com/github/gh-aw / git

Function git

actions/setup/js/apply_samples.test.cjs:33–39  ·  view source on GitHub ↗
(args, cwd)

Source from the content-addressed store, hash-verified

31}
32
33function git(args, cwd) {
34 const r = spawnSync("git", args, { cwd, encoding: "utf8" });
35 if (r.status !== 0) {
36 throw new Error(`git ${args.join(" ")} failed: ${r.stderr || r.stdout}`);
37 }
38 return r.stdout;
39}
40
41function initRepo(dir, defaultBranch) {
42 git(["init", "-q", "-b", defaultBranch], dir);

Callers 2

initRepoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected