fix(redact-prepush): strip every parent column from combined-diff lines, so a merged release bump is exempt like any other

This commit is contained in:
garrytan committed 2026-10-08 16:27:23 +00:00
1 parent 10d845ab4d
commit c0dc59d829
3 files changed
+32 -1

No files matched your search

+2 -1
View File
@@ -339,7 +339,8 @@ function collectAddedLines(diff: string, commit?: string): AddedFile[] {
const inResult = inHunk && !line.startsWith("\\") && !line.slice(0, parents).includes("-");
const lineNumber = inResult ? nextLine++ : 0;
if (line.startsWith("+")) {
fileLines.push(line.slice(1));
// A combined (--cc) body line carries one prefix column per parent.
fileLines.push(line.slice(inHunk ? parents : 1));
lineNumbers.push(lineNumber);
}
}