MCPcopy Create free account
hub / github.com/continuedev/continue / getDiff

Method getDiff

extensions/vscode/src/util/ideUtils.ts:619–642  ·  view source on GitHub ↗
(includeUnstaged: boolean)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 5

_getRepositoriesMethod · 0.95
splitDiffMethod · 0.95
diffMethod · 0.80
errorMethod · 0.80
pushMethod · 0.65

Tested by

no test coverage detected