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
a55fa46f
Commit
a55fa46f
authored
Jun 27, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
6fa6cb56
ccf3caf4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
changelogs/unreleased/po-raw-changes-encoding.yml
changelogs/unreleased/po-raw-changes-encoding.yml
+5
-0
lib/gitlab/git/raw_diff_change.rb
lib/gitlab/git/raw_diff_change.rb
+2
-2
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+13
-0
spec/support/helpers/test_env.rb
spec/support/helpers/test_env.rb
+2
-1
No files found.
changelogs/unreleased/po-raw-changes-encoding.yml
0 → 100644
View file @
a55fa46f
---
title
:
Expect bytes from Gitaly RPC GetRawChanges
merge_request
:
28164
author
:
type
:
fixed
lib/gitlab/git/raw_diff_change.rb
View file @
a55fa46f
...
...
@@ -11,8 +11,8 @@ module Gitlab
if
raw_change
.
is_a?
(
Gitaly
::
GetRawChangesResponse
::
RawChange
)
@blob_id
=
raw_change
.
blob_id
@blob_size
=
raw_change
.
size
@old_path
=
raw_change
.
old_path
.
presence
@new_path
=
raw_change
.
new_path
.
presence
@old_path
=
raw_change
.
old_path
_bytes
.
presence
@new_path
=
raw_change
.
new_path
_bytes
.
presence
@operation
=
raw_change
.
operation
&
.
downcase
||
:unknown
else
parse
(
raw_change
)
...
...
spec/models/repository_spec.rb
View file @
a55fa46f
...
...
@@ -844,6 +844,19 @@ describe Repository do
end
end
describe
'#get_raw_changes'
do
context
`with non-UTF8 bytes in paths`
do
let
(
:old_rev
)
{
'd0888d297eadcd7a345427915c309413b1231e65'
}
let
(
:new_rev
)
{
'19950f03c765f7ac8723a73a0599764095f52fc0'
}
let
(
:changes
)
{
repository
.
raw_changes_between
(
old_rev
,
new_rev
)
}
it
'returns the changes'
do
expect
{
changes
}.
not_to
raise_error
expect
(
changes
.
first
.
new_path
.
bytes
).
to
eq
(
"hello
\x80
world"
.
bytes
)
end
end
end
describe
'#create_ref'
do
it
'redirects the call to write_ref'
do
ref
,
ref_path
=
'1'
,
'2'
...
...
spec/support/helpers/test_env.rb
View file @
a55fa46f
...
...
@@ -64,7 +64,8 @@ module TestEnv
'with-codeowners'
=>
'219560e'
,
'submodule_inside_folder'
=>
'b491b92'
,
'png-lfs'
=>
'fe42f41'
,
'sha-starting-with-large-number'
=>
'8426165'
'sha-starting-with-large-number'
=>
'8426165'
,
'invalid-utf8-diff-paths'
=>
'99e4853'
}.
freeze
# gitlab-test-fork is a fork of gitlab-fork, but we don't necessarily
...
...
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