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

Function getHeadCommitFiles

test/e2e/utils.ts:274–285  ·  view source on GitHub ↗
(gitDir: string)

Source from the content-addressed store, hash-verified

272};
273
274export const getHeadCommitFiles = async (gitDir: string): Promise<string[]> => {
275 const { stdout } = await runGit(
276 ['diff-tree', '--root', '--no-commit-id', '--name-only', '-r', 'HEAD'],
277 gitDir
278 );
279
280 return stdout
281 .split('\n')
282 .map((file) => file.trim())
283 .filter(Boolean)
284 .sort();
285};
286
287export const getShortGitStatus = async (gitDir: string): Promise<string> => {
288 const { stdout } = await runGit(['status', '--short'], gitDir);

Callers 1

Calls 4

runGitFunction · 0.85
filterMethod · 0.80
trimMethod · 0.80
sortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…