diff --git a/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts index 38aa9ec4236..5d3f3c45386 100644 --- a/extensions/git/src/api/api1.ts +++ b/extensions/git/src/api/api1.ts @@ -160,10 +160,6 @@ export class ApiRepository implements Repository { return this.repository.diffBetween(ref1, ref2, path); } - getDiff(): Promise { - return this.repository.getDiff(); - } - hashObject(data: string): Promise { return this.repository.hashObject(data); } diff --git a/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts index cf462435a2c..d6d2166e00b 100644 --- a/extensions/git/src/api/git.d.ts +++ b/extensions/git/src/api/git.d.ts @@ -226,8 +226,6 @@ export interface Repository { diffBetween(ref1: string, ref2: string): Promise; diffBetween(ref1: string, ref2: string, path: string): Promise; - getDiff(): Promise; - hashObject(data: string): Promise; createBranch(name: string, checkout: boolean, ref?: string): Promise; diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 7f29a213ed3..30369a1efa1 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -1599,21 +1599,6 @@ export class Repository implements Disposable { return await this.run(Operation.RevList, () => this.repository.getCommitCount(range)); } - async getDiff(): Promise { - const diff: string[] = []; - if (this.indexGroup.resourceStates.length !== 0) { - for (const file of this.indexGroup.resourceStates.map(r => r.resourceUri.fsPath)) { - diff.push(await this.diffIndexWithHEAD(file)); - } - } else { - for (const file of this.workingTreeGroup.resourceStates.map(r => r.resourceUri.fsPath)) { - diff.push(await this.diffWithHEAD(file)); - } - } - - return diff; - } - async revParse(ref: string): Promise { return await this.run(Operation.RevParse, () => this.repository.revParse(ref)); }