mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 13:12:26 +00:00
fix(ci): preserve line breaks in Git blob paths (#12227)
This commit is contained in:
1 parent
1a89383a79
commit
fedf33eb59
2 files changed
+21
-3
No files matched your search
@@ -450,11 +450,11 @@ export const gitRepository = (cwd = process.cwd()) => {
|
||||
git("ls-tree", "-r", "-z", "--name-only", revision, "--", ...directories)
|
||||
.split("\0")
|
||||
.filter(Boolean),
|
||||
// One batch process reads every requested blob.
|
||||
// NUL-terminate requests so a line break in a path remains part of its name.
|
||||
readFiles: (revision, paths) => {
|
||||
const output = execFileSync("git", ["cat-file", "--batch"], {
|
||||
const output = execFileSync("git", ["cat-file", "--batch", "-z"], {
|
||||
cwd,
|
||||
input: paths.map((path) => `${revision}:${path}\n`).join(""),
|
||||
input: paths.map((path) => `${revision}:${path}\0`).join(""),
|
||||
maxBuffer: 512 * 1024 * 1024,
|
||||
});
|
||||
const contents = new Map();
|
||||
|
||||
Reference in new issue
Block a user