Skip to content

Commit a7f384b

Browse files
authored
Git - remove deprecated extension API (microsoft#209010)
1 parent 1d1c28e commit a7f384b

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

extensions/git/src/api/api1.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@ export class ApiRepository implements Repository {
160160
return this.repository.diffBetween(ref1, ref2, path);
161161
}
162162

163-
getDiff(): Promise<string[]> {
164-
return this.repository.getDiff();
165-
}
166-
167163
hashObject(data: string): Promise<string> {
168164
return this.repository.hashObject(data);
169165
}

extensions/git/src/api/git.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,6 @@ export interface Repository {
226226
diffBetween(ref1: string, ref2: string): Promise<Change[]>;
227227
diffBetween(ref1: string, ref2: string, path: string): Promise<string>;
228228

229-
getDiff(): Promise<string[]>;
230-
231229
hashObject(data: string): Promise<string>;
232230

233231
createBranch(name: string, checkout: boolean, ref?: string): Promise<void>;

extensions/git/src/repository.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,21 +1599,6 @@ export class Repository implements Disposable {
15991599
return await this.run(Operation.RevList, () => this.repository.getCommitCount(range));
16001600
}
16011601

1602-
async getDiff(): Promise<string[]> {
1603-
const diff: string[] = [];
1604-
if (this.indexGroup.resourceStates.length !== 0) {
1605-
for (const file of this.indexGroup.resourceStates.map(r => r.resourceUri.fsPath)) {
1606-
diff.push(await this.diffIndexWithHEAD(file));
1607-
}
1608-
} else {
1609-
for (const file of this.workingTreeGroup.resourceStates.map(r => r.resourceUri.fsPath)) {
1610-
diff.push(await this.diffWithHEAD(file));
1611-
}
1612-
}
1613-
1614-
return diff;
1615-
}
1616-
16171602
async revParse(ref: string): Promise<string | undefined> {
16181603
return await this.run(Operation.RevParse, () => this.repository.revParse(ref));
16191604
}

0 commit comments

Comments
 (0)