Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
28d95e10
Commit
28d95e10
authored
Sep 19, 2017
by
Ahmad Sherif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Encode paths properly for Gitaly Commit{Diff,Delta}
Fixes gitaly#589
parent
706426d5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
lib/gitlab/gitaly_client/commit_service.rb
lib/gitlab/gitaly_client/commit_service.rb
+1
-1
spec/lib/gitlab/gitaly_client/commit_service_spec.rb
spec/lib/gitlab/gitaly_client/commit_service_spec.rb
+4
-0
No files found.
lib/gitlab/gitaly_client/commit_service.rb
View file @
28d95e10
...
@@ -221,7 +221,7 @@ module Gitlab
...
@@ -221,7 +221,7 @@ module Gitlab
repository:
@gitaly_repo
,
repository:
@gitaly_repo
,
left_commit_id:
parent_id
,
left_commit_id:
parent_id
,
right_commit_id:
commit
.
id
,
right_commit_id:
commit
.
id
,
paths:
options
.
fetch
(
:paths
,
[])
paths:
options
.
fetch
(
:paths
,
[])
.
map
{
|
path
|
GitalyClient
.
encode
(
path
)
}
}
}
end
end
...
...
spec/lib/gitlab/gitaly_client/commit_service_spec.rb
View file @
28d95e10
...
@@ -51,6 +51,10 @@ describe Gitlab::GitalyClient::CommitService do
...
@@ -51,6 +51,10 @@ describe Gitlab::GitalyClient::CommitService do
expect
(
ret
).
to
be_kind_of
(
Gitlab
::
GitalyClient
::
DiffStitcher
)
expect
(
ret
).
to
be_kind_of
(
Gitlab
::
GitalyClient
::
DiffStitcher
)
end
end
it
'encodes paths correctly'
do
expect
{
client
.
diff_from_parent
(
commit
,
paths:
[
'encoding/test.txt'
,
'encoding/テスト.txt'
])
}.
not_to
raise_error
end
end
end
describe
'#commit_deltas'
do
describe
'#commit_deltas'
do
...
...
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