Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d49ea348
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,发现更多精彩内容 >>
提交
d49ea348
编写于
12月 15, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/Microsoft/vscode
上级
198667a8
195c346f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
7 deletion
+18
-7
extensions/git/src/commands.ts
extensions/git/src/commands.ts
+3
-4
src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts
.../workbench/parts/scm/electron-browser/scm.contribution.ts
+6
-0
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
+9
-3
未找到文件。
extensions/git/src/commands.ts
浏览文件 @
d49ea348
...
...
@@ -351,7 +351,6 @@ export class CommandCenter {
const
config
=
workspace
.
getConfiguration
(
'
git
'
);
let
value
=
config
.
get
<
string
>
(
'
defaultCloneDirectory
'
)
||
os
.
homedir
();
value
=
value
.
replace
(
/^~/
,
os
.
homedir
());
const
parentPath
=
await
window
.
showInputBox
({
prompt
:
localize
(
'
parent
'
,
"
Parent Directory
"
),
...
...
@@ -379,7 +378,7 @@ export class CommandCenter {
statusBarItem
.
command
=
cancelCommandId
;
statusBarItem
.
show
();
const
clonePromise
=
this
.
git
.
clone
(
url
,
parentPath
,
tokenSource
.
token
);
const
clonePromise
=
this
.
git
.
clone
(
url
,
parentPath
.
replace
(
/^~/
,
os
.
homedir
())
,
tokenSource
.
token
);
try
{
window
.
withProgress
({
location
:
ProgressLocation
.
SourceControl
,
title
:
localize
(
'
cloning
'
,
"
Cloning git repository...
"
)
},
()
=>
clonePromise
);
...
...
@@ -1326,7 +1325,7 @@ export class CommandCenter {
const
remoteRefs
=
repository
.
refs
;
const
remoteRefsFiltered
=
remoteRefs
.
filter
(
r
=>
(
r
.
remote
===
remotePick
.
label
));
const
branchPicks
=
remoteRefsFiltered
.
map
(
r
=>
({
label
:
r
.
name
}))
as
{
label
:
string
;
description
:
string
}[];
const
branchPicks
=
remoteRefsFiltered
.
map
(
r
=>
({
label
:
r
.
name
}))
as
{
label
:
string
;
description
:
string
}[];
const
branchPick
=
await
window
.
showQuickPick
(
branchPicks
,
{
placeHolder
});
if
(
!
branchPick
)
{
...
...
@@ -1335,7 +1334,7 @@ export class CommandCenter {
const
remoteCharCnt
=
remotePick
.
label
.
length
;
repository
.
pull
(
false
,
remotePick
.
label
,
branchPick
.
label
.
slice
(
remoteCharCnt
+
1
));
repository
.
pull
(
false
,
remotePick
.
label
,
branchPick
.
label
.
slice
(
remoteCharCnt
+
1
));
}
@
command
(
'
git.pull
'
,
{
repository
:
true
})
...
...
src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts
浏览文件 @
d49ea348
...
...
@@ -66,8 +66,14 @@ Registry.as<IWorkbenchActionRegistry>(WorkbenchActionExtensions.WorkbenchActions
Registry
.
as
<
IConfigurationRegistry
>
(
ConfigurationExtensions
.
Configuration
).
registerConfiguration
({
id
:
'
scm
'
,
order
:
5
,
title
:
localize
(
'
scmConfigurationTitle
'
,
"
SCM
"
),
type
:
'
object
'
,
properties
:
{
'
scm.alwaysShowProviders
'
:
{
type
:
'
boolean
'
,
description
:
localize
(
'
alwaysShowProviders
'
,
"
Whether to always show the Source Control Provider section.
"
),
default
:
false
},
'
scm.diffDecorations
'
:
{
type
:
'
string
'
,
enum
:
[
'
all
'
,
'
gutter
'
,
'
overview
'
,
'
none
'
],
...
...
src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts
浏览文件 @
d49ea348
...
...
@@ -8,7 +8,7 @@
import
'
vs/css!./media/scmViewlet
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
Event
,
{
Emitter
,
chain
,
mapEvent
,
anyEvent
}
from
'
vs/base/common/event
'
;
import
Event
,
{
Emitter
,
chain
,
mapEvent
,
anyEvent
,
filterEvent
}
from
'
vs/base/common/event
'
;
import
{
domEvent
,
stop
}
from
'
vs/base/browser/event
'
;
import
{
basename
}
from
'
vs/base/common/paths
'
;
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
...
...
@@ -1035,7 +1035,8 @@ export class SCMViewlet extends PanelViewlet implements IViewModel {
@
IWorkbenchEditorService
protected
editorService
:
IWorkbenchEditorService
,
@
IWorkspaceContextService
contextService
:
IWorkspaceContextService
,
@
IStorageService
storageService
:
IStorageService
,
@
IExtensionService
extensionService
:
IExtensionService
@
IExtensionService
extensionService
:
IExtensionService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
)
{
super
(
VIEWLET_ID
,
{
showHeaderInTitleWhenSingleView
:
true
},
telemetryService
,
themeService
);
...
...
@@ -1054,6 +1055,10 @@ export class SCMViewlet extends PanelViewlet implements IViewModel {
this
.
scmService
.
onDidAddRepository
(
this
.
onDidAddRepository
,
this
,
this
.
disposables
);
this
.
scmService
.
onDidRemoveRepository
(
this
.
onDidRemoveRepository
,
this
,
this
.
disposables
);
this
.
scmService
.
repositories
.
forEach
(
r
=>
this
.
onDidAddRepository
(
r
));
const
onDidUpdateConfiguration
=
filterEvent
(
this
.
configurationService
.
onDidChangeConfiguration
,
e
=>
e
.
affectsConfiguration
(
'
scm.alwaysShowProviders
'
));
onDidUpdateConfiguration
(
this
.
onDidChangeRepositories
,
this
,
this
.
disposables
);
this
.
onDidChangeRepositories
();
}
...
...
@@ -1087,7 +1092,8 @@ export class SCMViewlet extends PanelViewlet implements IViewModel {
private
onDidChangeRepositories
():
void
{
toggleClass
(
this
.
el
,
'
empty
'
,
this
.
scmService
.
repositories
.
length
===
0
);
const
shouldMainPanelBeVisible
=
this
.
scmService
.
repositories
.
length
>
1
;
const
shouldMainPanelAlwaysBeVisible
=
this
.
configurationService
.
getValue
(
'
scm.alwaysShowProviders
'
);
const
shouldMainPanelBeVisible
=
shouldMainPanelAlwaysBeVisible
||
this
.
scmService
.
repositories
.
length
>
1
;
if
(
!!
this
.
mainPanel
===
shouldMainPanelBeVisible
)
{
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录