Skip to content

Commit 05a2f28

Browse files
authored
Don't show 'Sync Changes' button if auto sync or auto push are enabled (microsoft#134408)
1 parent b59f00f commit 05a2f28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

extensions/git/src/repository.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1927,8 +1927,9 @@ export class Repository implements Disposable {
19271927
if (HEAD !== undefined) {
19281928
const config = workspace.getConfiguration('git', Uri.file(this.repository.root));
19291929
const showActionButton = config.get<string>('showUnpublishedCommitsButton', 'whenEmpty');
1930+
const postCommitCommand = config.get<string>('postCommitCommand');
19301931

1931-
if (showActionButton === 'always' || (showActionButton === 'whenEmpty' && workingTree.length === 0 && index.length === 0 && untracked.length === 0 && merge.length === 0)) {
1932+
if (showActionButton === 'always' || (showActionButton === 'whenEmpty' && workingTree.length === 0 && index.length === 0 && untracked.length === 0 && merge.length === 0 && postCommitCommand !== 'sync' && postCommitCommand !== 'push')) {
19321933
if (HEAD.name && HEAD.commit) {
19331934
if (HEAD.upstream) {
19341935
if (HEAD.ahead) {

0 commit comments

Comments
 (0)