mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
rename git.untrackedChanges: default to mixed
This commit is contained in:
parent
363647b245
commit
ad6011cb7a
|
@ -907,42 +907,42 @@
|
|||
},
|
||||
{
|
||||
"command": "git.cleanAll",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == default",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.stageAll",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == default",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.cleanAll",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == default",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "git.stageAll",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == default",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges == mixed",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "git.cleanAllTracked",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != default",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.stageAllTracked",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != default",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
|
||||
"group": "1_modification"
|
||||
},
|
||||
{
|
||||
"command": "git.cleanAllTracked",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != default",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "git.stageAllTracked",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != default",
|
||||
"when": "scmProvider == git && scmResourceGroup == workingTree && config.git.untrackedChanges != mixed",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
|
@ -1601,16 +1601,16 @@
|
|||
"git.untrackedChanges": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"default",
|
||||
"mixed",
|
||||
"separate",
|
||||
"hidden"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"%config.untrackedChanges.default%",
|
||||
"%config.untrackedChanges.mixed%",
|
||||
"%config.untrackedChanges.separate%",
|
||||
"%config.untrackedChanges.hidden%"
|
||||
],
|
||||
"default": "default",
|
||||
"default": "mixed",
|
||||
"description": "%config.untrackedChanges%",
|
||||
"scope": "resource"
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
"config.supportCancellation": "Controls whether a notification comes up when running the Sync action, which allows the user to cancel the operation.",
|
||||
"config.branchSortOrder": "Controls the sort order for branches.",
|
||||
"config.untrackedChanges": "Controls how untracked changes behave.",
|
||||
"config.untrackedChanges.default": "All changes, tracked and untracked, appear together and behave equally.",
|
||||
"config.untrackedChanges.mixed": "All changes, tracked and untracked, appear together and behave equally.",
|
||||
"config.untrackedChanges.separate": "Untracked changes appear separately in the Source Control view. They are also excluded from several actions.",
|
||||
"config.untrackedChanges.hidden": "Untracked changes are hidden and excluded from several actions.",
|
||||
"colors.added": "Color for added resources.",
|
||||
|
|
|
@ -915,8 +915,8 @@ export class CommandCenter {
|
|||
}
|
||||
|
||||
const config = workspace.getConfiguration('git', Uri.file(repository.root));
|
||||
const untrackedChanges = config.get<'default' | 'separate' | 'hidden'>('untrackedChanges');
|
||||
await repository.add([], untrackedChanges === 'default' ? undefined : { update: true });
|
||||
const untrackedChanges = config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges');
|
||||
await repository.add([], untrackedChanges === 'mixed' ? undefined : { update: true });
|
||||
}
|
||||
|
||||
private async _stageDeletionConflict(repository: Repository, uri: Uri): Promise<void> {
|
||||
|
@ -1421,7 +1421,7 @@ export class CommandCenter {
|
|||
opts.all = 'tracked';
|
||||
}
|
||||
|
||||
if (opts.all && config.get<'default' | 'separate' | 'hidden'>('untrackedChanges') !== 'default') {
|
||||
if (opts.all && config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges') !== 'mixed') {
|
||||
opts.all = 'tracked';
|
||||
}
|
||||
|
||||
|
|
|
@ -1509,7 +1509,7 @@ export class Repository implements Disposable {
|
|||
this._submodules = submodules!;
|
||||
this.rebaseCommit = rebaseCommit;
|
||||
|
||||
const untrackedChanges = scopedConfig.get<'default' | 'separate' | 'hidden'>('untrackedChanges');
|
||||
const untrackedChanges = scopedConfig.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges');
|
||||
const index: Resource[] = [];
|
||||
const workingTree: Resource[] = [];
|
||||
const merge: Resource[] = [];
|
||||
|
@ -1523,12 +1523,12 @@ export class Repository implements Disposable {
|
|||
|
||||
switch (raw.x + raw.y) {
|
||||
case '??': switch (untrackedChanges) {
|
||||
case 'default': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.UNTRACKED, useIcons));
|
||||
case 'mixed': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.UNTRACKED, useIcons));
|
||||
case 'separate': return untracked.push(new Resource(ResourceGroupType.Untracked, uri, Status.UNTRACKED, useIcons));
|
||||
default: return undefined;
|
||||
}
|
||||
case '!!': switch (untrackedChanges) {
|
||||
case 'default': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.IGNORED, useIcons));
|
||||
case 'mixed': return workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.IGNORED, useIcons));
|
||||
case 'separate': return untracked.push(new Resource(ResourceGroupType.Untracked, uri, Status.IGNORED, useIcons));
|
||||
default: return undefined;
|
||||
}
|
||||
|
@ -1575,7 +1575,7 @@ export class Repository implements Disposable {
|
|||
private setCountBadge(): void {
|
||||
const config = workspace.getConfiguration('git', Uri.file(this.repository.root));
|
||||
const countBadge = config.get<'all' | 'tracked' | 'off'>('countBadge');
|
||||
const untrackedChanges = config.get<'default' | 'separate' | 'hidden'>('untrackedChanges');
|
||||
const untrackedChanges = config.get<'mixed' | 'separate' | 'hidden'>('untrackedChanges');
|
||||
|
||||
let count =
|
||||
this.mergeGroup.resourceStates.length +
|
||||
|
@ -1585,7 +1585,7 @@ export class Repository implements Disposable {
|
|||
switch (countBadge) {
|
||||
case 'off': count = 0; break;
|
||||
case 'tracked':
|
||||
if (untrackedChanges === 'default') {
|
||||
if (untrackedChanges === 'mixed') {
|
||||
count -= this.workingTreeGroup.resourceStates.filter(r => r.type === Status.UNTRACKED || r.type === Status.IGNORED).length;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue