MCPcopy
hub / github.com/di-sukharev/opencommit / gitAdd

Function gitAdd

src/utils/git.ts:84–94  ·  view source on GitHub ↗
({ files }: { files: string[] })

Source from the content-addressed store, hash-verified

82};
83
84export const gitAdd = async ({ files }: { files: string[] }) => {
85 const gitDir = await getGitDir();
86
87 const gitAddSpinner = spinner();
88
89 gitAddSpinner.start('Adding files to commit');
90
91 await execa('git', ['add', ...files], { cwd: gitDir });
92
93 gitAddSpinner.stop(`Staged ${files.length} files`);
94};
95
96const isFileExcludedFromDiff = (file: string) =>
97 file.includes('.lock') ||

Callers 2

prepareCommitMessageHookFunction · 0.90
commitFunction · 0.90

Calls 3

execaFunction · 0.85
getGitDirFunction · 0.70
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…