mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 14:31:31 +01:00
Implements first iteration of multi diff editors.
Co-authored-by: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com>
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user