(includeUnstaged: boolean)
| 617 | } |
| 618 | |
| 619 | async getDiff(includeUnstaged: boolean): Promise<string[]> { |
| 620 | const diffs: string[] = []; |
| 621 | |
| 622 | const repos = this._getRepositories(); |
| 623 | |
| 624 | try { |
| 625 | if (repos) { |
| 626 | for (const repo of repos) { |
| 627 | const staged = await repo.diff(true); |
| 628 | |
| 629 | diffs.push(staged); |
| 630 | if (includeUnstaged) { |
| 631 | const unstaged = await repo.diff(false); |
| 632 | diffs.push(unstaged); |
| 633 | } |
| 634 | } |
| 635 | } |
| 636 | |
| 637 | return diffs.flatMap((diff) => this.splitDiff(diff)); |
| 638 | } catch (e) { |
| 639 | console.error(e); |
| 640 | return []; |
| 641 | } |
| 642 | } |
| 643 | } |
nothing calls this directly
no test coverage detected