BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d6066870
Commit
d6066870
authored
Nov 02, 2017
by
Kim Carlbäcker
Committed by
Douwe Maan
Nov 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix encoding issue with Repository.ls_files
parent
e54dd249
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
1 deletion
+9
-1
commit_service.rb
lib/gitlab/gitaly_client/commit_service.rb
+1
-1
repository_spec.rb
spec/lib/gitlab/git/repository_spec.rb
+5
-0
3e379fcaa5f818fca81cdbabd7a497794d6535
...est.git/objects/88/3e379fcaa5f818fca81cdbabd7a497794d6535
+0
-0
b1ab16c858c67b680eea4644cf652485f555cf
...est.git/objects/c8/b1ab16c858c67b680eea4644cf652485f555cf
+0
-0
7697aea12699f0b44544332a7c0f41ace5fb16
...est.git/objects/e3/7697aea12699f0b44544332a7c0f41ace5fb16
+3
-0
a0c153ed20d927bab00507f356043b6b4be31e
...est.git/objects/eb/a0c153ed20d927bab00507f356043b6b4be31e
+0
-0
5ad228d96e2a2ae7088e8557fe8906f6dd2b3f
...est.git/objects/f6/5ad228d96e2a2ae7088e8557fe8906f6dd2b3f
+0
-0
No files found.
lib/gitlab/gitaly_client/commit_service.rb
View file @
d6066870
...
...
@@ -18,7 +18,7 @@ module Gitlab
response
=
GitalyClient
.
call
(
@repository
.
storage
,
:commit_service
,
:list_files
,
request
)
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
...
...
spec/lib/gitlab/git/repository_spec.rb
View file @
d6066870
...
...
@@ -1163,6 +1163,7 @@ describe Gitlab::Git::Repository, seed_helper: true do
describe
"#ls_files"
do
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"
)
}
it
"read every file paths of master branch"
do
...
...
@@ -1184,6 +1185,10 @@ describe Gitlab::Git::Repository, seed_helper: true do
it
"returns empty array when not existed branch"
do
expect
(
not_existed_branch
.
length
).
to
equal
(
0
)
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
describe
"#copy_gitattributes"
do
...
...
spec/support/gitlab-git-test.git/objects/88/3e379fcaa5f818fca81cdbabd7a497794d6535
0 → 100644
View file @
d6066870
File added
spec/support/gitlab-git-test.git/objects/c8/b1ab16c858c67b680eea4644cf652485f555cf
0 → 100644
View file @
d6066870
File added
spec/support/gitlab-git-test.git/objects/e3/7697aea12699f0b44544332a7c0f41ace5fb16
0 → 100644
View file @
d6066870
File added
spec/support/gitlab-git-test.git/objects/eb/a0c153ed20d927bab00507f356043b6b4be31e
0 → 100644
View file @
d6066870
File added
spec/support/gitlab-git-test.git/objects/f6/5ad228d96e2a2ae7088e8557fe8906f6dd2b3f
0 → 100644
View file @
d6066870
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment