| 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 | }; |
| 85686 | var 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 |