Git - remove deprecated extension API (#209010)

This commit is contained in:
Ladislau Szomoru 2024-03-28 13:25:40 +01:00 committed by GitHub
parent 1d1c28eed1
commit a7f384badb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 0 additions and 21 deletions

View file

@ -160,10 +160,6 @@ export class ApiRepository implements Repository {
return this.repository.diffBetween(ref1, ref2, path);
}
getDiff(): Promise<string[]> {
return this.repository.getDiff();
}
hashObject(data: string): Promise<string> {
return this.repository.hashObject(data);
}

View file

@ -226,8 +226,6 @@ export interface Repository {
diffBetween(ref1: string, ref2: string): Promise<Change[]>;
diffBetween(ref1: string, ref2: string, path: string): Promise<string>;
getDiff(): Promise<string[]>;
hashObject(data: string): Promise<string>;
createBranch(name: string, checkout: boolean, ref?: string): Promise<void>;

View file

@ -1599,21 +1599,6 @@ export class Repository implements Disposable {
return await this.run(Operation.RevList, () => this.repository.getCommitCount(range));
}
async getDiff(): Promise<string[]> {
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<string | undefined> {
return await this.run(Operation.RevParse, () => this.repository.revParse(ref));
}