Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
d6066870
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d6066870
编写于
11月 02, 2017
作者:
K
Kim Carlbäcker
提交者:
Douwe Maan
11月 02, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix encoding issue with Repository.ls_files
上级
e54dd249
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
8 addition
and
1 deletion
+8
-1
lib/gitlab/gitaly_client/commit_service.rb
lib/gitlab/gitaly_client/commit_service.rb
+1
-1
spec/lib/gitlab/git/repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+5
-0
spec/support/gitlab-git-test.git/objects/88/3e379fcaa5f818fca81cdbabd7a497794d6535
...est.git/objects/88/3e379fcaa5f818fca81cdbabd7a497794d6535
+0
-0
spec/support/gitlab-git-test.git/objects/c8/b1ab16c858c67b680eea4644cf652485f555cf
...est.git/objects/c8/b1ab16c858c67b680eea4644cf652485f555cf
+0
-0
spec/support/gitlab-git-test.git/objects/e3/7697aea12699f0b44544332a7c0f41ace5fb16
...est.git/objects/e3/7697aea12699f0b44544332a7c0f41ace5fb16
+2
-0
spec/support/gitlab-git-test.git/objects/eb/a0c153ed20d927bab00507f356043b6b4be31e
...est.git/objects/eb/a0c153ed20d927bab00507f356043b6b4be31e
+0
-0
spec/support/gitlab-git-test.git/objects/f6/5ad228d96e2a2ae7088e8557fe8906f6dd2b3f
...est.git/objects/f6/5ad228d96e2a2ae7088e8557fe8906f6dd2b3f
+0
-0
未找到文件。
lib/gitlab/gitaly_client/commit_service.rb
浏览文件 @
d6066870
...
@@ -18,7 +18,7 @@ module Gitlab
...
@@ -18,7 +18,7 @@ module Gitlab
response
=
GitalyClient
.
call
(
@repository
.
storage
,
:commit_service
,
:list_files
,
request
)
response
=
GitalyClient
.
call
(
@repository
.
storage
,
:commit_service
,
:list_files
,
request
)
response
.
flat_map
do
|
msg
|
response
.
flat_map
do
|
msg
|
msg
.
paths
.
map
{
|
d
|
d
.
dup
.
force_encoding
(
Encoding
::
UTF_8
)
}
msg
.
paths
.
map
{
|
d
|
EncodingHelper
.
encode!
(
d
.
dup
)
}
end
end
end
end
...
...
spec/lib/gitlab/git/repository_spec.rb
浏览文件 @
d6066870
...
@@ -1163,6 +1163,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
...
@@ -1163,6 +1163,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
describe
"#ls_files"
do
describe
"#ls_files"
do
let
(
:master_file_paths
)
{
repository
.
ls_files
(
"master"
)
}
let
(
:master_file_paths
)
{
repository
.
ls_files
(
"master"
)
}
let
(
:utf8_file_paths
)
{
repository
.
ls_files
(
"ls-files-utf8"
)
}
let
(
:not_existed_branch
)
{
repository
.
ls_files
(
"not_existed_branch"
)
}
let
(
:not_existed_branch
)
{
repository
.
ls_files
(
"not_existed_branch"
)
}
it
"read every file paths of master branch"
do
it
"read every file paths of master branch"
do
...
@@ -1184,6 +1185,10 @@ describe Gitlab::Git::Repository, seed_helper: true do
...
@@ -1184,6 +1185,10 @@ describe Gitlab::Git::Repository, seed_helper: true do
it
"returns empty array when not existed branch"
do
it
"returns empty array when not existed branch"
do
expect
(
not_existed_branch
.
length
).
to
equal
(
0
)
expect
(
not_existed_branch
.
length
).
to
equal
(
0
)
end
end
it
"returns valid utf-8 data"
do
expect
(
utf8_file_paths
.
map
{
|
file
|
file
.
force_encoding
(
'utf-8'
)
}).
to
all
(
be_valid_encoding
)
end
end
end
describe
"#copy_gitattributes"
do
describe
"#copy_gitattributes"
do
...
...
spec/support/gitlab-git-test.git/objects/88/3e379fcaa5f818fca81cdbabd7a497794d6535
0 → 100644
浏览文件 @
d6066870
文件已添加
spec/support/gitlab-git-test.git/objects/c8/b1ab16c858c67b680eea4644cf652485f555cf
0 → 100644
浏览文件 @
d6066870
文件已添加
spec/support/gitlab-git-test.git/objects/e3/7697aea12699f0b44544332a7c0f41ace5fb16
0 → 100644
浏览文件 @
d6066870
xK
0EgNI|ADt*^ mZ qGčY8ZK7"Fc%oHD9rZLsMJ2=ACmeFgVxI9H2XJrp6;N8z??>+zWƏBÞf}bN@K\SYiSC
\ No newline at end of file
spec/support/gitlab-git-test.git/objects/eb/a0c153ed20d927bab00507f356043b6b4be31e
0 → 100644
浏览文件 @
d6066870
文件已添加
spec/support/gitlab-git-test.git/objects/f6/5ad228d96e2a2ae7088e8557fe8906f6dd2b3f
0 → 100644
浏览文件 @
d6066870
文件已添加
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录