MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / runGit

Function runGit

packages/backend/src/git.test.ts:8–21  ·  view source on GitHub ↗
(
    repoPath: string,
    args: string[],
    env: Record<string, string> = {},
)

Source from the content-addressed store, hash-verified

6import { getBranches, getTags } from "./git.js";
7
8const runGit = (
9 repoPath: string,
10 args: string[],
11 env: Record<string, string> = {},
12) => {
13 execFileSync("git", args, {
14 cwd: repoPath,
15 env: {
16 ...process.env,
17 ...env,
18 },
19 stdio: "pipe",
20 });
21};
22
23const createTempRepo = async () => {
24 const repoPath = await mkdtemp(join(tmpdir(), "sourcebot-git-test-"));

Callers 3

createTempRepoFunction · 0.85
commitFileFunction · 0.85
git.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected