Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ad6011cb
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ad6011cb
编写于
10月 28, 2019
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename git.untrackedChanges: default to mixed
上级
363647b2
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
20 addition
and
20 deletion
+20
-20
extensions/git/package.json
extensions/git/package.json
+11
-11
extensions/git/package.nls.json
extensions/git/package.nls.json
+1
-1
extensions/git/src/commands.ts
extensions/git/src/commands.ts
+3
-3
extensions/git/src/repository.ts
extensions/git/src/repository.ts
+5
-5
未找到文件。
extensions/git/package.json
浏览文件 @
ad6011cb
...
...
@@ -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"
}
...
...
extensions/git/package.nls.json
浏览文件 @
ad6011cb
...
...
@@ -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."
,
...
...
extensions/git/src/commands.ts
浏览文件 @
ad6011cb
...
...
@@ -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
'
;
}
...
...
extensions/git/src/repository.ts
浏览文件 @
ad6011cb
...
...
@@ -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
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录