style(cso): format merged snapshot history capture

This commit is contained in:
garrytan committed 2026-10-19 20:54:56 +00:00
1 parent 69f75768dc
commit 6b5569b86a
1 file changed
+3 -1
+3 -1
View File
@@ -953,7 +953,9 @@ export async function capture(
if (!(error instanceof CsoError) || error.code !== 'MISSING_INPUT') throw error;
}
guard();
const commits = withholdHistory(patched ?? '', exclusion).split(/^(?=commit [0-9a-f]{40}(?:[0-9a-f]{24})?$)/m).filter(Boolean),
const commits = withholdHistory(patched ?? '', exclusion)
.split(/^(?=commit [0-9a-f]{40}(?:[0-9a-f]{24})?$)/m)
.filter(Boolean),
sizes = commits.map((commit) => Buffer.byteLength(commit)),
whole = sizes.reduce((sum, size) => sum + size, 0) <= MAX_OUTPUT;
let kept = 0,