From 6cdcf296a71b5d0516d632e1955b0c3663d3d3dd Mon Sep 17 00:00:00 2001 From: Luke Albao Date: Thu, 25 Jan 2024 14:49:59 -0800 Subject: [PATCH 1/2] Extend git ls-files maxBuffer to 3MiB --- src/lib/file/readGit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/file/readGit.ts b/src/lib/file/readGit.ts index 3a9574b..c4326e8 100644 --- a/src/lib/file/readGit.ts +++ b/src/lib/file/readGit.ts @@ -2,7 +2,7 @@ import fs, { Stats } from 'fs'; import { exec } from '../util/exec'; export const readGit = async (dir: string): Promise => { - const { stdout } = await exec('git ls-files', { cwd: dir }); + const { stdout } = await exec('git ls-files', { cwd: dir, maxBuffer: 3 * 2 ** 20, }); // 3MiB return stdout.split('\n').filter((filePath) => { let stats: Stats | undefined = undefined; try { From 8e5c1cff7c5ddf5583b79ba1b67d3201dc6471ca Mon Sep 17 00:00:00 2001 From: Luke Albao Date: Thu, 25 Jan 2024 15:07:26 -0800 Subject: [PATCH 2/2] lint fix --- src/lib/file/readGit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/file/readGit.ts b/src/lib/file/readGit.ts index c4326e8..2917c4e 100644 --- a/src/lib/file/readGit.ts +++ b/src/lib/file/readGit.ts @@ -2,7 +2,7 @@ import fs, { Stats } from 'fs'; import { exec } from '../util/exec'; export const readGit = async (dir: string): Promise => { - const { stdout } = await exec('git ls-files', { cwd: dir, maxBuffer: 3 * 2 ** 20, }); // 3MiB + const { stdout } = await exec('git ls-files', { cwd: dir, maxBuffer: 3 * 2 ** 20 }); // 3MiB return stdout.split('\n').filter((filePath) => { let stats: Stats | undefined = undefined; try {