Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
8abfb948
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,发现更多精彩内容 >>
提交
8abfb948
编写于
1月 09, 2017
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
git: clean command
上级
1d2bf7f4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
66 addition
and
9 deletion
+66
-9
extensions/git/package.json
extensions/git/package.json
+51
-7
extensions/git/resources/icons/dark/clean.svg
extensions/git/resources/icons/dark/clean.svg
+1
-0
extensions/git/resources/icons/light/clean.svg
extensions/git/resources/icons/light/clean.svg
+1
-0
extensions/git/src/commands.ts
extensions/git/src/commands.ts
+13
-2
未找到文件。
extensions/git/package.json
浏览文件 @
8abfb948
...
...
@@ -31,10 +31,15 @@
}
},
{
"command"
:
"git.open"
,
"command"
:
"git.open
Change
"
,
"title"
:
"Open Change"
,
"category"
:
"Git"
},
{
"command"
:
"git.openFile"
,
"title"
:
"Open File"
,
"category"
:
"Git"
},
{
"command"
:
"git.stage"
,
"title"
:
"Stage"
,
...
...
@@ -70,6 +75,15 @@
"light"
:
"resources/icons/light/unstage.svg"
,
"dark"
:
"resources/icons/dark/unstage.svg"
}
},
{
"command"
:
"git.clean"
,
"title"
:
"Clean"
,
"category"
:
"Git"
,
"icon"
:
{
"light"
:
"resources/icons/light/clean.svg"
,
"dark"
:
"resources/icons/dark/clean.svg"
}
}
],
"menus"
:
{
...
...
@@ -102,22 +116,52 @@
],
"scm/resource/context"
:
[
{
"command"
:
"git.
unsta
ge"
,
"command"
:
"git.
openChan
ge"
,
"when"
:
"scmProvider == git && scmResourceGroup == index"
},
{
"command"
:
"git.unstage"
,
"group"
:
"inline"
,
"command"
:
"git.openFile"
,
"when"
:
"scmProvider == git && scmResourceGroup == index"
},
{
"command"
:
"git.unstage"
,
"when"
:
"scmProvider == git && scmResourceGroup == index"
,
"group"
:
"1_modification"
},
{
"command"
:
"git.unstage"
,
"when"
:
"scmProvider == git && scmResourceGroup == index"
,
"group"
:
"inline"
},
{
"command"
:
"git.openChange"
,
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
"group"
:
"navigation"
},
{
"command"
:
"git.openFile"
,
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
"group"
:
"navigation"
},
{
"command"
:
"git.stage"
,
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
"group"
:
"1_modification"
},
{
"command"
:
"git.clean"
,
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
"group"
:
"1_modification"
},
{
"command"
:
"git.clean"
,
"when"
:
"scmProvider == git && scmResourceGroup == workingTree"
,
"group"
:
"inline"
},
{
"command"
:
"git.stage"
,
"
group"
:
"inlin
e"
,
"
when"
:
"scmProvider == git && scmResourceGroup == workingTre
e"
"
when"
:
"scmProvider == git && scmResourceGroup == workingTre
e"
,
"
group"
:
"inlin
e"
}
]
},
...
...
extensions/git/resources/icons/dark/clean.svg
0 → 100644
浏览文件 @
8abfb948
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"-0.994 0 16 16"
enable-background=
"new -0.994 0 16 16"
><path
fill=
"#C5C5C5"
d=
"M13 6c0 1.461-.636 2.846-1.746 3.797l-5.584 4.951-1.324-1.496 5.595-4.962c.678-.582 1.061-1.413 1.061-2.29 0-1.654-1.345-3-2.997-3-.71 0-1.399.253-1.938.713l-1.521 1.287h2.448l-1.998 2h-3.996v-4l1.998-2v2.692l1.775-1.504c.899-.766 2.047-1.188 3.232-1.188 2.754 0 4.995 2.243 4.995 5z"
/></svg>
\ No newline at end of file
extensions/git/resources/icons/light/clean.svg
0 → 100644
浏览文件 @
8abfb948
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
viewBox=
"-0.994 0 16 16"
enable-background=
"new -0.994 0 16 16"
><path
fill=
"#424242"
d=
"M13 6c0 1.461-.636 2.846-1.746 3.797l-5.584 4.951-1.324-1.496 5.595-4.962c.678-.582 1.061-1.413 1.061-2.29 0-1.654-1.345-3-2.997-3-.71 0-1.399.253-1.938.713l-1.521 1.287h2.448l-1.998 2h-3.996v-4l1.998-2v2.692l1.775-1.504c.899-.766 2.047-1.188 3.232-1.188 2.754 0 4.995 2.243 4.995 5z"
/></svg>
\ No newline at end of file
extensions/git/src/commands.ts
浏览文件 @
8abfb948
...
...
@@ -16,7 +16,11 @@ function refresh(model: Model): () => void {
};
}
function
open
(...
args
:
any
[]):
void
{
function
openChange
(...
args
:
any
[]):
void
{
console
.
log
(
'
open
'
,
args
);
}
function
openFile
(...
args
:
any
[]):
void
{
console
.
log
(
'
open
'
,
args
);
}
...
...
@@ -36,14 +40,21 @@ function unstageAll(resourceGroup: SCMResourceGroup): void {
log
(
'
unstage-all
'
,
resourceGroup
);
}
function
clean
(
resource
:
SCMResource
):
void
{
log
(
'
clean
'
,
resource
);
}
export
function
registerCommands
(
model
:
Model
):
Disposable
{
const
disposables
=
[
commands
.
registerCommand
(
'
git.refresh
'
,
refresh
(
model
)),
commands
.
registerCommand
(
'
git.openChange
'
,
openChange
),
commands
.
registerCommand
(
'
git.openFile
'
,
openFile
),
commands
.
registerCommand
(
'
git.stage
'
,
stage
),
commands
.
registerCommand
(
'
git.stage-all
'
,
stageAll
),
commands
.
registerCommand
(
'
git.unstage
'
,
unstage
),
commands
.
registerCommand
(
'
git.unstage-all
'
,
unstageAll
),
commands
.
registerCommand
(
'
git.
open
'
,
open
)
commands
.
registerCommand
(
'
git.
clean
'
,
clean
),
];
return
Disposable
.
from
(...
disposables
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录