Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6d11792a
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,发现更多精彩内容 >>
提交
6d11792a
编写于
10月 01, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change the git extension to use shared tsconfig
上级
52d3961c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
17 deletion
+16
-17
extensions/git/src/api/extension.ts
extensions/git/src/api/extension.ts
+1
-1
extensions/git/src/commands.ts
extensions/git/src/commands.ts
+6
-3
extensions/git/src/decorationProvider.ts
extensions/git/src/decorationProvider.ts
+1
-0
extensions/git/src/decorators.ts
extensions/git/src/decorators.ts
+1
-1
extensions/git/src/repository.ts
extensions/git/src/repository.ts
+3
-2
extensions/git/tsconfig.json
extensions/git/tsconfig.json
+4
-10
未找到文件。
extensions/git/src/api/extension.ts
浏览文件 @
6d11792a
...
...
@@ -9,7 +9,7 @@ import { Model } from '../model';
import
{
GitExtension
,
Repository
,
API
}
from
'
./git
'
;
import
{
ApiRepository
,
ApiImpl
}
from
'
./api1
'
;
export
function
deprecated
(
target
:
any
,
key
:
string
,
descriptor
:
any
):
void
{
export
function
deprecated
(
_
target
:
any
,
key
:
string
,
descriptor
:
any
):
void
{
if
(
typeof
descriptor
.
value
!==
'
function
'
)
{
throw
new
Error
(
'
not supported
'
);
}
...
...
extensions/git/src/commands.ts
浏览文件 @
6d11792a
...
...
@@ -120,7 +120,7 @@ interface Command {
const
Commands
:
Command
[]
=
[];
function
command
(
commandId
:
string
,
options
:
CommandOptions
=
{}):
Function
{
return
(
target
:
any
,
key
:
string
,
descriptor
:
any
)
=>
{
return
(
_
target
:
any
,
key
:
string
,
descriptor
:
any
)
=>
{
if
(
!
(
typeof
descriptor
.
value
===
'
function
'
))
{
throw
new
Error
(
'
not supported
'
);
}
...
...
@@ -146,11 +146,11 @@ async function categorizeResourceByResolution(resources: Resource[]): Promise<{
const
possibleUnresolved
=
merge
.
filter
(
isBothAddedOrModified
);
const
promises
=
possibleUnresolved
.
map
(
s
=>
grep
(
s
.
resourceUri
.
fsPath
,
/^<
{7}
|^=
{7}
|^>
{7}
/
));
const
unresolvedBothModified
=
await
Promise
.
all
<
boolean
>
(
promises
);
const
resolved
=
possibleUnresolved
.
filter
((
s
,
i
)
=>
!
unresolvedBothModified
[
i
]);
const
resolved
=
possibleUnresolved
.
filter
((
_
s
,
i
)
=>
!
unresolvedBothModified
[
i
]);
const
deletionConflicts
=
merge
.
filter
(
s
=>
isAnyDeleted
(
s
));
const
unresolved
=
[
...
merge
.
filter
(
s
=>
!
isBothAddedOrModified
(
s
)
&&
!
isAnyDeleted
(
s
)),
...
possibleUnresolved
.
filter
((
s
,
i
)
=>
unresolvedBothModified
[
i
])
...
possibleUnresolved
.
filter
((
_
s
,
i
)
=>
unresolvedBothModified
[
i
])
];
return
{
merge
,
resolved
,
unresolved
,
deletionConflicts
};
...
...
@@ -304,6 +304,7 @@ export class CommandCenter {
case
Status
.
DELETED_BY_THEM
:
return
this
.
getURI
(
resource
.
resourceUri
,
''
);
}
return
undefined
;
}
private
async
getRightResource
(
resource
:
Resource
):
Promise
<
Uri
|
undefined
>
{
...
...
@@ -346,6 +347,7 @@ export class CommandCenter {
case
Status
.
BOTH_MODIFIED
:
return
resource
.
resourceUri
;
}
return
undefined
;
}
private
getTitle
(
resource
:
Resource
):
string
{
...
...
@@ -2052,6 +2054,7 @@ export class CommandCenter {
return
repository
.
workingTreeGroup
.
resourceStates
.
filter
(
r
=>
r
.
resourceUri
.
toString
()
===
uriString
)[
0
]
||
repository
.
indexGroup
.
resourceStates
.
filter
(
r
=>
r
.
resourceUri
.
toString
()
===
uriString
)[
0
];
}
return
undefined
;
}
private
runByRepository
<
T
>
(
resource
:
Uri
,
fn
:
(
repository
:
Repository
,
resource
:
Uri
)
=>
Promise
<
T
>
):
Promise
<
T
[]
>
;
...
...
extensions/git/src/decorationProvider.ts
浏览文件 @
6d11792a
...
...
@@ -56,6 +56,7 @@ class GitIgnoreDecorationProvider implements DecorationProvider {
color
:
new
ThemeColor
(
'
gitDecoration.ignoredResourceForeground
'
)
};
}
return
undefined
;
});
}
...
...
extensions/git/src/decorators.ts
浏览文件 @
6d11792a
...
...
@@ -8,7 +8,7 @@
import
{
done
}
from
'
./util
'
;
function
decorate
(
decorator
:
(
fn
:
Function
,
key
:
string
)
=>
Function
):
Function
{
return
(
target
:
any
,
key
:
string
,
descriptor
:
any
)
=>
{
return
(
_
target
:
any
,
key
:
string
,
descriptor
:
any
)
=>
{
let
fnKey
:
string
|
null
=
null
;
let
fn
:
Function
|
null
=
null
;
...
...
extensions/git/src/repository.ts
浏览文件 @
6d11792a
...
...
@@ -846,7 +846,7 @@ export class Repository implements Disposable {
});
}
async
branch
(
name
:
string
,
checkout
:
boolean
,
ref
?:
string
):
Promise
<
void
>
{
async
branch
(
name
:
string
,
_checkout
:
boolean
,
_
ref
?:
string
):
Promise
<
void
>
{
await
this
.
run
(
Operation
.
Branch
,
()
=>
this
.
repository
.
branch
(
name
,
true
));
}
...
...
@@ -1292,6 +1292,7 @@ export class Repository implements Disposable {
case
'
M
'
:
workingTree
.
push
(
new
Resource
(
ResourceGroupType
.
WorkingTree
,
uri
,
Status
.
MODIFIED
,
useIcons
,
renameUri
));
break
;
case
'
D
'
:
workingTree
.
push
(
new
Resource
(
ResourceGroupType
.
WorkingTree
,
uri
,
Status
.
DELETED
,
useIcons
,
renameUri
));
break
;
}
return
undefined
;
});
// set resource groups
...
...
@@ -1342,7 +1343,7 @@ export class Repository implements Disposable {
}
}
private
onFSChange
(
uri
:
Uri
):
void
{
private
onFSChange
(
_
uri
:
Uri
):
void
{
const
config
=
workspace
.
getConfiguration
(
'
git
'
);
const
autorefresh
=
config
.
get
<
boolean
>
(
'
autorefresh
'
);
...
...
extensions/git/tsconfig.json
浏览文件 @
6d11792a
{
"extends"
:
"../shared.tsconfig.json"
,
"compilerOptions"
:
{
"target"
:
"es6"
,
"lib"
:
[
"es2016"
],
"module"
:
"commonjs"
,
"outDir"
:
"./out"
,
"experimentalDecorators"
:
true
,
"typeRoots"
:
[
"./node_modules/@types"
],
"strict"
:
true
,
"experimentalDecorators"
:
true
,
"noUnusedLocals"
:
true
]
},
"include"
:
[
"src/**/*"
]
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录