@@ -19,52 +19,6 @@ export const getIsGitRepo = async () => {
1919 }
2020} ;
2121
22- // const excludeBigFilesFromDiff = ['*-lock.*', '*.lock'].map(
23- // (file) => `:(exclude)${file}`
24- // );
25-
26- // export const getAITDDIgnore = (): Ignore => {
27- // const ig = ignore();
28-
29- // try {
30- // ig.add(readFileSync(".aitddignore").toString().split("\n"));
31- // } catch (e) {}
32-
33- // return ig;
34- // };
35-
36- // export const getCoreHooksPath = async (): Promise<string> => {
37- // const { stdout } = await execa("git", ["config", "core.hooksPath"]);
38-
39- // return stdout;
40- // };
41-
42- // export const getStagedFiles = async (): Promise<string[]> => {
43- // const { stdout: gitDir } = await execa("git", [
44- // "rev-parse",
45- // "--show-toplevel",
46- // ]);
47-
48- // const { stdout: files } = await execa("git", [
49- // "diff",
50- // "--name-only",
51- // "--cached",
52- // "--relative",
53- // gitDir,
54- // ]);
55-
56- // if (!files) return [];
57-
58- // const filesList = files.split("\n");
59-
60- // const ig = getAITDDIgnore();
61- // const allowedFiles = filesList.filter((file) => !ig.ignores(file));
62-
63- // if (!allowedFiles) return [];
64-
65- // return allowedFiles.sort();
66- // };
67-
6822export const getChangedFiles = async ( ) : Promise < string [ ] > => {
6923 await assertGitRepo ( ) ;
7024
@@ -83,13 +37,6 @@ export const getChangedFiles = async (): Promise<string[]> => {
8337 return files . sort ( ) ;
8438} ;
8539
86- // export const gitAdd = async ({ files }: { files: string[] }) => {
87- // const gitAddSpinner = spinner();
88- // gitAddSpinner.start('Adding files to commit');
89- // await execa('git', ['add', ...files]);
90- // gitAddSpinner.stop('Done');
91- // };
92-
9340export const getDiff = async ( { files } : { files : string [ ] } ) => {
9441 const lockFiles = files . filter (
9542 ( file ) =>
0 commit comments