mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Add git.pullTags setting
This commit is contained in:
parent
11f4127091
commit
2058f27615
|
@ -1272,6 +1272,12 @@
|
|||
"default": false,
|
||||
"description": "%config.fetchOnPull%"
|
||||
},
|
||||
"git.pullTags": {
|
||||
"type": "boolean",
|
||||
"scope": "resource",
|
||||
"default": true,
|
||||
"description": "%config.pullTags%"
|
||||
},
|
||||
"git.autoStash": {
|
||||
"type": "boolean",
|
||||
"scope": "resource",
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
"config.rebaseWhenSync": "Force git to use rebase when running the sync command.",
|
||||
"config.confirmEmptyCommits": "Always confirm the creation of empty commits.",
|
||||
"config.fetchOnPull": "Fetch all branches when pulling or just the current one.",
|
||||
"config.pullTags": "Fetch all tags when pulling.",
|
||||
"config.autoStash": "Stash any changes before pulling and restore them after successful pull.",
|
||||
"config.allowForcePush": "Controls whether force push (with or without lease) is enabled.",
|
||||
"config.useForcePushWithLease": "Controls whether force pushing uses the safer force-with-lease variant.",
|
||||
|
|
|
@ -12,7 +12,7 @@ import { EventEmitter } from 'events';
|
|||
import iconv = require('iconv-lite');
|
||||
import * as filetype from 'file-type';
|
||||
import { assign, groupBy, denodeify, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent } from './util';
|
||||
import { CancellationToken, Uri } from 'vscode';
|
||||
import { CancellationToken, Uri, workspace } from 'vscode';
|
||||
import { detectEncoding } from './encoding';
|
||||
import { Ref, RefType, Branch, Remote, GitErrorCodes, LogOptions, Change, Status } from './api/git';
|
||||
|
||||
|
@ -1362,7 +1362,12 @@ export class Repository {
|
|||
}
|
||||
|
||||
async pull(rebase?: boolean, remote?: string, branch?: string, options: PullOptions = {}): Promise<void> {
|
||||
const args = ['pull', '--tags'];
|
||||
const args = ['pull'];
|
||||
const config = workspace.getConfiguration('git', Uri.file(this.root));
|
||||
|
||||
if (config.get<boolean>('pullTags')) {
|
||||
args.push('--tags');
|
||||
}
|
||||
|
||||
if (options.unshallow) {
|
||||
args.push('--unshallow');
|
||||
|
|
Loading…
Reference in a new issue