Skip to content

Commit 7e8f0b9

Browse files
committed
Exclude patch signature from patch file regex
1 parent 3e7dc34 commit 7e8f0b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/lib/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function binaryFileDummyDetails(fromFile: string, toFile: string, status:
101101
};
102102
}
103103

104-
const fileRegex = /diff --git a\/(\S+) b\/(\S+)\r?\n(?:.+\r?\n)*?(?=diff --git|$)/g;
104+
const fileRegex = /diff --git a\/(\S+) b\/(\S+)\r?\n(?:.+\r?\n)*?(?=-- *\r?\n|diff --git|$)/g;
105105

106106
export function splitMultiFilePatch(patchContent: string): FileDetails[] {
107107
const patches: FileDetails[] = [];

0 commit comments

Comments
 (0)