From 40ac54adbbd29ff8b77a5d612f68b94756a6304b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 8 May 2026 23:39:30 +0100 Subject: [PATCH] test: simplify committer path collection --- test/scripts/committer.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/scripts/committer.test.ts b/test/scripts/committer.test.ts index 052a8baf8e0..f7b98a1db14 100644 --- a/test/scripts/committer.test.ts +++ b/test/scripts/committer.test.ts @@ -57,7 +57,13 @@ function commitWithHelperArgs(repo: string, ...args: string[]) { function committedPaths(repo: string) { const output = git(repo, "diff-tree", "--no-commit-id", "--name-only", "-r", "HEAD"); - return output.split("\n").filter(Boolean).toSorted(); + const paths: string[] = []; + for (const line of output.split("\n")) { + if (line) { + paths.push(line); + } + } + return paths.toSorted(); } function committedFileContents(repo: string, relativePath: string) {