(diffString: string)
| 605 | } |
| 606 | |
| 607 | private splitDiff(diffString: string): string[] { |
| 608 | const fileDiffHeaderRegex = /(?=diff --git a\/.* b\/.*)/; |
| 609 | |
| 610 | const diffs = diffString.split(fileDiffHeaderRegex); |
| 611 | |
| 612 | if (diffs[0].trim() === "") { |
| 613 | diffs.shift(); |
| 614 | } |
| 615 | |
| 616 | return diffs; |
| 617 | } |
| 618 | |
| 619 | async getDiff(includeUnstaged: boolean): Promise<string[]> { |
| 620 | const diffs: string[] = []; |