Skip to content

Commit

Permalink
Git - remove references of scm.experimental.showSyncView from the Com…
Browse files Browse the repository at this point in the history
…mit action button (#199616)
  • Loading branch information
lszomoru authored Nov 30, 2023
1 parent 36fefc8 commit c6b48c3
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions extensions/git/src/actionButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ export class CommitActionButton extends AbstractActionButton {
this.onDidChangeSmartCommitSettings();
}

if (e.affectsConfiguration('scm.experimental.showSyncView') ||
e.affectsConfiguration('git.branchProtectionPrompt', root) ||
if (e.affectsConfiguration('git.branchProtectionPrompt', root) ||
e.affectsConfiguration('git.postCommitCommand', root) ||
e.affectsConfiguration('git.rememberPostCommitCommand', root) ||
e.affectsConfiguration('git.showActionButton', root)) {
Expand Down Expand Up @@ -256,11 +255,6 @@ export class CommitActionButton extends AbstractActionButton {
}

protected override getPublishBranchActionButton(): SourceControlActionButton | undefined {
const scmConfig = workspace.getConfiguration('scm');
if (scmConfig.get<boolean>('experimental.showSyncView', false)) {
return undefined;
}

const config = workspace.getConfiguration('git', Uri.file(this.repository.root));
const showActionButton = config.get<{ publish: boolean }>('showActionButton', { publish: true });

Expand All @@ -271,11 +265,6 @@ export class CommitActionButton extends AbstractActionButton {
}

protected override getSyncChangesActionButton(): SourceControlActionButton | undefined {
const scmConfig = workspace.getConfiguration('scm');
if (scmConfig.get<boolean>('experimental.showSyncView', false)) {
return undefined;
}

const config = workspace.getConfiguration('git', Uri.file(this.repository.root));
const showActionButton = config.get<{ sync: boolean }>('showActionButton', { sync: true });
const branchIsAheadOrBehind = (this.state.HEAD?.behind ?? 0) > 0 || (this.state.HEAD?.ahead ?? 0) > 0;
Expand Down

0 comments on commit c6b48c3

Please sign in to comment.