Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e2b2b5bc
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,发现更多精彩内容 >>
提交
e2b2b5bc
编写于
9月 12, 2018
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master', commit 'refs/pull/56048/head' of github.com:Microsoft/vscode into pr/56048
上级
3f51b7fd
bf3b6947
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
0 deletion
+33
-0
extensions/git/package.json
extensions/git/package.json
+20
-0
extensions/git/package.nls.json
extensions/git/package.nls.json
+1
-0
extensions/git/src/commands.ts
extensions/git/src/commands.ts
+8
-0
extensions/git/src/git.ts
extensions/git/src/git.ts
+3
-0
extensions/git/src/repository.ts
extensions/git/src/repository.ts
+1
-0
未找到文件。
extensions/git/package.json
浏览文件 @
e2b2b5bc
...
...
@@ -190,6 +190,11 @@
"title"
:
"%command.commitStaged%"
,
"category"
:
"Git"
},
{
"command"
:
"git.commitEmpty"
,
"title"
:
"%command.commitEmpty%"
,
"category"
:
"Git"
},
{
"command"
:
"git.commitStagedSigned"
,
"title"
:
"%command.commitStagedSigned%"
,
...
...
@@ -417,6 +422,10 @@
"command"
:
"git.commit"
,
"when"
:
"config.git.enabled && gitOpenRepositoryCount != 0"
},
{
"command"
:
"git.commitEmpty"
,
"when"
:
"config.git.allowcommitEmptys && gitOpenRepositoryCount != 0"
},
{
"command"
:
"git.commitStaged"
,
"when"
:
"config.git.enabled && gitOpenRepositoryCount != 0"
...
...
@@ -599,6 +608,11 @@
"group"
:
"3_commit"
,
"when"
:
"scmProvider == git"
},
{
"command"
:
"git.commitEmpty"
,
"group"
:
"3_commit"
,
"when"
:
"scmProvider == git"
},
{
"command"
:
"git.commitStagedSigned"
,
"group"
:
"3_commit"
,
...
...
@@ -991,6 +1005,12 @@
"description"
:
"%config.enableCommitSigning%"
,
"default"
:
false
},
"git.allowEmptyCommits"
:
{
"type"
:
"boolean"
,
"scope"
:
"resource"
,
"description"
:
"%config.allowEmptyCommits%"
,
"default"
:
false
},
"git.decorations.enabled"
:
{
"type"
:
"boolean"
,
"default"
:
true
,
...
...
extensions/git/package.nls.json
浏览文件 @
e2b2b5bc
...
...
@@ -22,6 +22,7 @@
"command.cleanAll"
:
"Discard All Changes"
,
"command.commit"
:
"Commit"
,
"command.commitStaged"
:
"Commit Staged"
,
"command.commitEmpty"
:
"Commit Empty"
,
"command.commitStagedSigned"
:
"Commit Staged (Signed Off)"
,
"command.commitStagedAmend"
:
"Commit Staged (Amend)"
,
"command.commitAll"
:
"Commit All"
,
...
...
extensions/git/src/commands.ts
浏览文件 @
e2b2b5bc
...
...
@@ -1086,10 +1086,13 @@ export class CommandCenter {
}
if
(
(
// no changes
(
noStagedChanges
&&
noUnstagedChanges
)
// or no staged changes and not `all`
||
(
!
opts
.
all
&&
noStagedChanges
)
)
&&
!
opts
.
empty
)
{
window
.
showInformationMessage
(
localize
(
'
no changes
'
,
"
There are no changes to commit.
"
));
return
false
;
...
...
@@ -1134,6 +1137,11 @@ export class CommandCenter {
}
}
@
command
(
'
git.commitEmpty
'
,
{
repository
:
true
})
async
commit
(
repository
:
Repository
):
Promise
<
void
>
{
await
this
.
commitWithAnyInput
(
repository
,
{
empty
:
true
});
}
@
command
(
'
git.commit
'
,
{
repository
:
true
})
async
commit
(
repository
:
Repository
):
Promise
<
void
>
{
await
this
.
commitWithAnyInput
(
repository
);
...
...
extensions/git/src/git.ts
浏览文件 @
e2b2b5bc
...
...
@@ -958,6 +958,9 @@ export class Repository {
if
(
opts
.
signCommit
)
{
args
.
push
(
'
-S
'
);
}
if
(
opts
.
empty
)
{
args
.
push
(
'
--allow-empty
'
);
}
try
{
await
this
.
run
(
args
,
{
input
:
message
||
''
});
...
...
extensions/git/src/repository.ts
浏览文件 @
e2b2b5bc
...
...
@@ -395,6 +395,7 @@ export interface CommitOptions {
amend
?:
boolean
;
signoff
?:
boolean
;
signCommit
?:
boolean
;
empty
?:
boolean
;
}
export
interface
GitResourceGroup
extends
SourceControlResourceGroup
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录