MCPcopy Create free account
hub / github.com/KartikLabhshetwar/lazycommit / createGit

Function createGit

tests/utils.ts:33–49  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

31};
32
33export const createGit = async (cwd: string) => {
34 const git = (command: string, args?: string[], options?: Options) =>
35 execa('git', [command, ...(args || [])], {
36 cwd,
37 ...options,
38 });
39
40 await git('init', [
41 // In case of different default branch name
42 '--initial-branch=master',
43 ]);
44
45 await git('config', ['user.name', 'name']);
46 await git('config', ['user.email', 'email']);
47
48 return git;
49};
50
51export const createFixture = async (source?: string | FileTree) => {
52 const fixture = await createFixtureBase(source);

Callers 3

git-hook.tsFile · 0.85
commits.tsFile · 0.85
error-cases.tsFile · 0.85

Calls 1

gitFunction · 0.85

Tested by

no test coverage detected