fix: harden release gate and page delivery
Memind CI / Test, build, and release guards (push) Failing after 12m3s
Memind CI / Test, build, and release guards (push) Failing after 12m3s
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export function parseGitStatusPorcelainZ(output) {
|
||||
const entries = String(output ?? '').split('\0');
|
||||
const paths = [];
|
||||
for (let index = 0; index < entries.length; index += 1) {
|
||||
const entry = entries[index];
|
||||
if (!entry) continue;
|
||||
if (entry.length < 4 || entry[2] !== ' ') {
|
||||
throw new Error(`Invalid git status --porcelain=v1 -z entry: ${entry.slice(0, 20)}`);
|
||||
}
|
||||
const status = entry.slice(0, 2);
|
||||
paths.push(entry.slice(3));
|
||||
if (/[RC]/.test(status)) {
|
||||
index += 1;
|
||||
}
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
Reference in New Issue
Block a user