Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(module-pins): add -z to git ls-tree for NUL-delimited output

Steven Enamakelaeb7d97a3977
diff --git a/scripts/__tests__/module-pins.test.mjs b/scripts/__tests__/module-pins.test.mjs
index eb9f36adb3..27ade31a90 100644
--- a/scripts/__tests__/module-pins.test.mjs
+++ b/scripts/__tests__/module-pins.test.mjs
@@ -239,7 +239,7 @@ function sourceParityFixture() {
testPath: "src/tests.rs",
},
};
- const canonicalTree = execFileSync("git", ["ls-tree", "-r", "--full-tree", releaseCommit], { cwd: root, encoding: "utf8" })
+ const canonicalTree = execFileSync("git", ["ls-tree", "-r", "--full-tree", "-z", releaseCommit], { cwd: root, encoding: "utf8" })
.split("\0").filter(Boolean).map((entry) => {
const match = entry.match(/^([0-7]{6}) (blob|commit) ([0-9a-f]{40})\t([\s\S]+)$/);
if (match[4] === "src/tests.rs") return null;