diff --git a/extensions/git/package.json b/extensions/git/package.json index 748868778dd..ba3e194ad03 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -1568,6 +1568,12 @@ "description": "%config.enableStatusBarSync%", "scope": "resource" }, + "git.pushTags": { + "type": "boolean", + "scope": "resource", + "default": false, + "description": "%config.pushTags%" + }, "git.promptToSaveFilesBeforeCommit": { "type": "string", "enum": [ diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 0e8ea1c649e..af825fe317f 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -111,6 +111,7 @@ "config.discardAllScope": "Controls what changes are discarded by the `Discard all changes` command. `all` discards all changes. `tracked` discards only tracked files. `prompt` shows a prompt dialog every time the action is run.", "config.decorations.enabled": "Controls whether Git contributes colors and badges to the explorer and the open editors view.", "config.enableStatusBarSync": "Controls whether the Git Sync command appears in the status bar.", + "config.pushTags": "Push all tags when synchronizing.", "config.promptToSaveFilesBeforeCommit": "Controls whether Git should check for unsaved files before committing.", "config.promptToSaveFilesBeforeCommit.always": "Check for any unsaved files.", "config.promptToSaveFilesBeforeCommit.staged": "Check only for unsaved staged files.", diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index edebe7e54c1..3662ae60747 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -1225,6 +1225,7 @@ export class Repository implements Disposable { const config = workspace.getConfiguration('git', Uri.file(this.root)); const fetchOnPull = config.get('fetchOnPull'); const tags = config.get('pullTags'); + const pushTags = config.get('pushTags'); const supportCancellation = config.get('supportCancellation'); const fn = fetchOnPull @@ -1252,7 +1253,7 @@ export class Repository implements Disposable { const shouldPush = this.HEAD && (typeof this.HEAD.ahead === 'number' ? this.HEAD.ahead > 0 : true); if (shouldPush) { - await this._push(remoteName, pushBranch); + await this._push(remoteName, pushBranch, false, pushTags); } }); });