MCPcopy
hub / github.com/21st-dev/1code / createGit

Function createGit

src/main/lib/git/git-factory.ts:29–43  ·  view source on GitHub ↗
(
	worktreePath: string,
	timeout: number = GIT_TIMEOUTS.LOCAL
)

Source from the content-addressed store, hash-verified

27 * @returns Configured SimpleGit instance
28 */
29export function createGit(
30 worktreePath: string,
31 timeout: number = GIT_TIMEOUTS.LOCAL
32): SimpleGit {
33 const options: Partial<SimpleGitOptions> = {
34 baseDir: worktreePath,
35 binary: "git",
36 maxConcurrentProcesses: 6,
37 timeout: {
38 block: timeout,
39 },
40 };
41
42 return simpleGit(options);
43}
44
45/**
46 * Creates a simple-git instance configured for network operations.

Callers 15

createBranchesRouterFunction · 0.90
gitSwitchBranchFunction · 0.90
gitCheckoutFileFunction · 0.90
gitCheckoutFilesFunction · 0.90
gitStageFileFunction · 0.90
gitStageAllFunction · 0.90
gitStageFilesFunction · 0.90
gitUnstageFileFunction · 0.90
gitUnstageAllFunction · 0.90
gitUnstageFilesFunction · 0.90
createGitForNetworkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected