mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-20 15:13:47 +01:00
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:
1 parent
10d845ab4d
commit
c0dc59d829
3 files changed
+32
-1
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user