mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
Git - Deprecate the refs property (#172772)
This commit is contained in:
@@ -32,7 +32,10 @@ export class ApiChange implements Change {
|
||||
export class ApiRepositoryState implements RepositoryState {
|
||||
|
||||
get HEAD(): Branch | undefined { return this._repository.HEAD; }
|
||||
get refs(): Ref[] { return [...this._repository.refs]; }
|
||||
/**
|
||||
* @deprecated Use ApiRepository.getRefs() instead.
|
||||
*/
|
||||
get refs(): Ref[] { console.warn('Deprecated. Use ApiRepository.getRefs() instead.'); return []; }
|
||||
get remotes(): Remote[] { return [...this._repository.remotes]; }
|
||||
get submodules(): Submodule[] { return [...this._repository.submodules]; }
|
||||
get rebaseCommit(): Commit | undefined { return this._repository.rebaseCommit; }
|
||||
|
||||
@@ -651,11 +651,6 @@ export class Repository implements Disposable {
|
||||
return this._HEAD;
|
||||
}
|
||||
|
||||
private _refs: Ref[] = [];
|
||||
get refs(): Ref[] {
|
||||
return this._refs;
|
||||
}
|
||||
|
||||
get headShortName(): string | undefined {
|
||||
if (!this.HEAD) {
|
||||
return;
|
||||
@@ -726,7 +721,6 @@ export class Repository implements Disposable {
|
||||
this._onDidChangeState.fire(state);
|
||||
|
||||
this._HEAD = undefined;
|
||||
this._refs = [];
|
||||
this._remotes = [];
|
||||
this.mergeGroup.resourceStates = [];
|
||||
this.indexGroup.resourceStates = [];
|
||||
@@ -2005,13 +1999,8 @@ export class Repository implements Disposable {
|
||||
|
||||
this._sourceControl.commitTemplate = commitTemplate;
|
||||
|
||||
// Execute cancellable long-running operations
|
||||
const [resourceGroups, refs] =
|
||||
await Promise.all([
|
||||
this.getStatus(cancellationToken),
|
||||
this.getRefs({}, cancellationToken)]);
|
||||
|
||||
this._refs = refs!;
|
||||
// Execute cancellable long-running operation
|
||||
const resourceGroups = await this.getStatus(cancellationToken);
|
||||
this._updateResourceGroupsState(resourceGroups);
|
||||
|
||||
this._onDidChangeStatus.fire();
|
||||
|
||||
Reference in New Issue
Block a user