Implements first iteration of multi diff editors.

Co-authored-by: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com>
This commit is contained in:
Henning Dieterichs
2023-11-07 16:49:15 +01:00
parent 93351c7436
commit 090fd2c772
35 changed files with 914 additions and 14 deletions

View File

@@ -2552,6 +2552,11 @@ export class Repository {
return commits[0];
}
async getCommitFiles(ref: string): Promise<string[]> {
const result = await this.exec(['diff-tree', '--no-commit-id', '--name-only', '-r', ref]);
return result.stdout.split('\n').filter(l => !!l);
}
async getCommitCount(range: string): Promise<{ ahead: number; behind: number }> {
const result = await this.exec(['rev-list', '--count', '--left-right', range]);
const [ahead, behind] = result.stdout.trim().split('\t');