Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
github
hub
提交
55dec7d3
H
hub
项目概览
github
/
hub
11 个月 前同步成功
通知
3
Star
22523
Fork
2406
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
55dec7d3
编写于
11月 29, 2017
作者:
M
Mislav Marohnić
提交者:
GitHub
11月 29, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1619 from jsoref/spelling
Spelling
上级
5ce945e7
9035849b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
11 addition
and
11 deletion
+11
-11
commands/clone.go
commands/clone.go
+2
-2
commands/fetch.go
commands/fetch.go
+2
-2
commands/init.go
commands/init.go
+2
-2
commands/release.go
commands/release.go
+2
-2
github/util.go
github/util.go
+2
-2
ui/format.go
ui/format.go
+1
-1
未找到文件。
commands/clone.go
浏览文件 @
55dec7d3
...
...
@@ -47,13 +47,13 @@ func clone(command *Command, args *Args) {
func
transformCloneArgs
(
args
*
Args
)
{
isSSH
:=
parseClonePrivateFlag
(
args
)
hasValueRegxp
:=
regexp
.
MustCompile
(
"^(--(upload-pack|template|depth|origin|branch|reference|name)|-[ubo])$"
)
hasValueReg
e
xp
:=
regexp
.
MustCompile
(
"^(--(upload-pack|template|depth|origin|branch|reference|name)|-[ubo])$"
)
nameWithOwnerRegexp
:=
regexp
.
MustCompile
(
NameWithOwnerRe
)
for
i
:=
0
;
i
<
args
.
ParamsSize
();
i
++
{
a
:=
args
.
Params
[
i
]
if
strings
.
HasPrefix
(
a
,
"-"
)
{
if
hasValueRegxp
.
MatchString
(
a
)
{
if
hasValueReg
e
xp
.
MatchString
(
a
)
{
i
++
}
}
else
{
...
...
commands/fetch.go
浏览文件 @
55dec7d3
...
...
@@ -34,12 +34,12 @@ func init() {
func
fetch
(
command
*
Command
,
args
*
Args
)
{
if
!
args
.
IsParamsEmpty
()
{
err
:=
tranformFetchArgs
(
args
)
err
:=
tran
s
formFetchArgs
(
args
)
utils
.
Check
(
err
)
}
}
func
tranformFetchArgs
(
args
*
Args
)
error
{
func
tran
s
formFetchArgs
(
args
*
Args
)
error
{
names
:=
parseRemoteNames
(
args
)
localRepo
,
err
:=
github
.
LocalRepo
()
...
...
commands/init.go
浏览文件 @
55dec7d3
...
...
@@ -50,13 +50,13 @@ func transformInitArgs(args *Args) error {
var
err
error
dirToInit
:=
"."
hasValueRegxp
:=
regexp
.
MustCompile
(
"^--(template|separate-git-dir|shared)$"
)
hasValueReg
e
xp
:=
regexp
.
MustCompile
(
"^--(template|separate-git-dir|shared)$"
)
// Find the first argument that isn't related to any of the init flags.
// We assume this is the optional `directory` argument to git init.
for
i
:=
0
;
i
<
args
.
ParamsSize
();
i
++
{
arg
:=
args
.
Params
[
i
]
if
hasValueRegxp
.
MatchString
(
arg
)
{
if
hasValueReg
e
xp
.
MatchString
(
arg
)
{
i
++
}
else
if
!
strings
.
HasPrefix
(
arg
,
"-"
)
{
dirToInit
=
arg
...
...
commands/release.go
浏览文件 @
55dec7d3
...
...
@@ -116,7 +116,7 @@ hub(1), git-tag(1)
Run
:
downloadRelease
,
}
cmdDeleteRelase
=
&
Command
{
cmdDeleteRel
e
ase
=
&
Command
{
Key
:
"delete"
,
Run
:
deleteRelease
,
}
...
...
@@ -165,7 +165,7 @@ func init() {
cmdRelease
.
Use
(
cmdCreateRelease
)
cmdRelease
.
Use
(
cmdEditRelease
)
cmdRelease
.
Use
(
cmdDownloadRelease
)
cmdRelease
.
Use
(
cmdDeleteRelase
)
cmdRelease
.
Use
(
cmdDeleteRel
e
ase
)
CmdRunner
.
Use
(
cmdRelease
)
}
...
...
github/util.go
浏览文件 @
55dec7d3
...
...
@@ -5,8 +5,8 @@ import (
)
func
IsHttpsProtocol
()
bool
{
httpPro
cot
ol
,
_
:=
git
.
Config
(
"hub.protocol"
)
if
httpPro
cot
ol
==
"https"
{
httpPro
toc
ol
,
_
:=
git
.
Config
(
"hub.protocol"
)
if
httpPro
toc
ol
==
"https"
{
return
true
}
...
...
ui/format.go
浏览文件 @
55dec7d3
...
...
@@ -20,7 +20,7 @@ type expander struct {
// values is the map of values that should be expanded.
values
map
[
string
]
string
// colorize is a flag to indic
i
ate whether to use colors.
// colorize is a flag to indicate whether to use colors.
colorize
bool
// skipNext is true if the next placeholder is not a placeholder and can be
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录