Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2c2122ee
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,发现更多精彩内容 >>
提交
2c2122ee
编写于
4月 16, 2018
作者:
W
wbarajas@umich.edu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature: add support to manually add repositories
上级
3fbfccad
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
50 addition
and
0 deletion
+50
-0
extensions/git/package.json
extensions/git/package.json
+18
-0
extensions/git/package.nls.json
extensions/git/package.nls.json
+1
-0
extensions/git/src/commands.ts
extensions/git/src/commands.ts
+31
-0
未找到文件。
extensions/git/package.json
浏览文件 @
2c2122ee
...
...
@@ -38,6 +38,15 @@
"dark"
:
"resources/icons/dark/git.svg"
}
},
{
"command"
:
"git.loadRepo"
,
"title"
:
"%command.loadRepo%"
,
"category"
:
"Git"
,
"icon"
:
{
"light"
:
"resources/icons/light/git.svg"
,
"dark"
:
"resources/icons/dark/git.svg"
}
},
{
"command"
:
"git.close"
,
"title"
:
"%command.close%"
,
...
...
@@ -336,6 +345,10 @@
"command"
:
"git.init"
,
"when"
:
"config.git.enabled"
},
{
"command"
:
"git.loadRepo"
,
"when"
:
"config.git.enabled"
},
{
"command"
:
"git.close"
,
"when"
:
"config.git.enabled && gitOpenRepositoryCount != 0"
...
...
@@ -535,6 +548,11 @@
"group"
:
"navigation"
,
"when"
:
"config.git.enabled && !scmProvider && gitOpenRepositoryCount == 0 && workspaceFolderCount != 0"
},
{
"command"
:
"git.loadRepo"
,
"group"
:
"navigation"
,
"when"
:
"config.git.enabled && !scmProvider && gitOpenRepositoryCount == 0 && workspaceFolderCount != 0"
},
{
"command"
:
"git.commit"
,
"group"
:
"navigation"
,
...
...
extensions/git/package.nls.json
浏览文件 @
2c2122ee
...
...
@@ -3,6 +3,7 @@
"description"
:
"Git SCM Integration"
,
"command.clone"
:
"Clone"
,
"command.init"
:
"Initialize Repository"
,
"command.loadRepo"
:
"Load Repo"
,
"command.close"
:
"Close Repository"
,
"command.refresh"
:
"Refresh"
,
"command.openChange"
:
"Open Changes"
,
...
...
extensions/git/src/commands.ts
浏览文件 @
2c2122ee
...
...
@@ -477,6 +477,37 @@ export class CommandCenter {
await
this
.
model
.
tryOpenRepository
(
path
);
}
@
command
(
'
git.loadRepo
'
,
{
repository
:
false
})
async
loadRepo
(
path
?:
string
):
Promise
<
void
>
{
if
(
!
path
)
{
path
=
await
window
.
showInputBox
({
prompt
:
localize
(
'
repopath
'
,
"
Repository Path
"
),
ignoreFocusOut
:
true
});
}
if
(
path
)
{
try
{
if
(
this
.
model
.
getRepository
(
path
))
{
await
this
.
model
.
tryOpenRepository
(
path
);
}
else
{
window
.
showInformationMessage
(
localize
(
'
notfound
'
,
"
Could not find a repository at this path
"
));
}
return
;
}
catch
(
err
)
{
//If something went wrong, tryOpenRepository should have already given error
}
}
}
@
command
(
'
git.close
'
,
{
repository
:
true
})
async
close
(
repository
:
Repository
):
Promise
<
void
>
{
this
.
model
.
close
(
repository
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录