MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / getChangedFiles

Function getChangedFiles

out/cli.cjs:85680–85694  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85678 );
85679 if (!files) return [];
85680 const filesList = files.split("\n");
85681 const ig = await getOpenCommitIgnore();
85682 const allowedFiles = filesList.filter((file) => !ig.ignores(file));
85683 if (!allowedFiles) return [];
85684 return allowedFiles.sort();
85685};
85686var getChangedFiles = async () => {
85687 const gitDir = await getGitDir();
85688 const { stdout: modified } = await execa("git", ["ls-files", "--modified"], {
85689 cwd: gitDir
85690 });
85691 const { stdout: others } = await execa(
85692 "git",
85693 ["ls-files", "--others", "--exclude-standard"],
85694 { cwd: gitDir }
85695 );
85696 const files = [...modified.split("\n"), ...others.split("\n")].filter(
85697 (file) => !!file

Callers 2

commitFunction · 0.70
prepareCommitMessageHookFunction · 0.70

Calls 4

execaFunction · 0.85
filterMethod · 0.80
getGitDirFunction · 0.70
sortMethod · 0.45

Tested by

no test coverage detected