mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Merge commit 'refs/pull/55976/head' of github.com:Microsoft/vscode into pr/55976
This commit is contained in:
@@ -600,8 +600,11 @@ export class Repository implements Disposable {
|
||||
this._indexGroup = this._sourceControl.createResourceGroup('index', localize('staged changes', "Staged Changes"));
|
||||
this._workingTreeGroup = this._sourceControl.createResourceGroup('workingTree', localize('changes', "Changes"));
|
||||
|
||||
const onConfigListener = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.showStagedChangesResourceGroup'));
|
||||
onConfigListener(this.showStagedChangesResourceGroup, this, this.disposables);
|
||||
this.showStagedChangesResourceGroup();
|
||||
|
||||
this.mergeGroup.hideWhenEmpty = true;
|
||||
this.indexGroup.hideWhenEmpty = true;
|
||||
|
||||
this.disposables.push(this.mergeGroup);
|
||||
this.disposables.push(this.indexGroup);
|
||||
@@ -712,6 +715,12 @@ export class Repository implements Disposable {
|
||||
return this.run(Operation.Config, () => this.repository.config('local', key, value));
|
||||
}
|
||||
|
||||
private showStagedChangesResourceGroup(): void {
|
||||
const config = workspace.getConfiguration('git');
|
||||
const gitShowStagedChangesResourceGroup = config.get<string>('showStagedChangesResourceGroup');
|
||||
this.indexGroup.hideWhenEmpty = !gitShowStagedChangesResourceGroup;
|
||||
}
|
||||
|
||||
@throttle
|
||||
async status(): Promise<void> {
|
||||
await this.run(Operation.Status);
|
||||
|
||||
Reference in New Issue
Block a user