mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
Git - add extension API to get a patch for a commit range (#286159)
* Git - add extension API to get a patch for a commit range * Turns out `git diff` does not support the `--root` flag
This commit is contained in:
@@ -200,6 +200,10 @@ export class ApiRepository implements Repository {
|
||||
return this.#repository.diffBetween(ref1, ref2, path);
|
||||
}
|
||||
|
||||
diffBetweenPatch(ref1: string, ref2: string, path?: string): Promise<string> {
|
||||
return this.#repository.diffBetweenPatch(ref1, ref2, path);
|
||||
}
|
||||
|
||||
diffBetweenWithStats(ref1: string, ref2: string, path?: string): Promise<DiffChange[]> {
|
||||
return this.#repository.diffBetweenWithStats(ref1, ref2, path);
|
||||
}
|
||||
|
||||
1
extensions/git/src/api/git.d.ts
vendored
1
extensions/git/src/api/git.d.ts
vendored
@@ -261,6 +261,7 @@ export interface Repository {
|
||||
diffBlobs(object1: string, object2: string): Promise<string>;
|
||||
diffBetween(ref1: string, ref2: string): Promise<Change[]>;
|
||||
diffBetween(ref1: string, ref2: string, path: string): Promise<string>;
|
||||
diffBetweenPatch(ref1: string, ref2: string, path?: string): Promise<string>;
|
||||
diffBetweenWithStats(ref1: string, ref2: string, path?: string): Promise<DiffChange[]>;
|
||||
|
||||
hashObject(data: string): Promise<string>;
|
||||
|
||||
Reference in New Issue
Block a user