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
8c3b3732
Commit
8c3b3732
authored
Apr 25, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
43fbf8fd
3fe07ce7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
changelogs/unreleased/jc-update-list-last-commits.yml
changelogs/unreleased/jc-update-list-last-commits.yml
+5
-0
lib/gitlab/gitaly_client/commit_service.rb
lib/gitlab/gitaly_client/commit_service.rb
+1
-1
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+19
-0
No files found.
GITALY_SERVER_VERSION
View file @
8c3b3732
1.3
4
.0
1.3
5
.0
\ No newline at end of file
changelogs/unreleased/jc-update-list-last-commits.yml
0 → 100644
View file @
8c3b3732
---
title
:
Client side changes for ListLastCommitsForTree response update
merge_request
:
26880
author
:
type
:
fixed
lib/gitlab/gitaly_client/commit_service.rb
View file @
8c3b3732
...
...
@@ -174,7 +174,7 @@ module Gitlab
response
.
each_with_object
({})
do
|
gitaly_response
,
hsh
|
gitaly_response
.
commits
.
each
do
|
commit_for_tree
|
hsh
[
commit_for_tree
.
path
]
=
Gitlab
::
Git
::
Commit
.
new
(
@repository
,
commit_for_tree
.
commit
)
hsh
[
commit_for_tree
.
path
_bytes
]
=
Gitlab
::
Git
::
Commit
.
new
(
@repository
,
commit_for_tree
.
commit
)
end
end
end
...
...
spec/models/repository_spec.rb
View file @
8c3b3732
...
...
@@ -217,6 +217,25 @@ describe Repository do
expect
(
result
.
size
).
to
eq
(
0
)
end
context
'with a commit with invalid UTF-8 path'
do
def
create_commit_with_invalid_utf8_path
rugged
=
rugged_repo
(
repository
)
blob_id
=
Rugged
::
Blob
.
from_buffer
(
rugged
,
"some contents"
)
tree_builder
=
Rugged
::
Tree
::
Builder
.
new
(
rugged
)
tree_builder
.
insert
({
oid:
blob_id
,
name:
"hello
\x80
world"
,
filemode:
0100644
})
tree_id
=
tree_builder
.
write
user
=
{
email:
"jcai@gitlab.com"
,
time:
Time
.
now
,
name:
"John Cai"
}
Rugged
::
Commit
.
create
(
rugged
,
message:
'some commit message'
,
parents:
[
rugged
.
head
.
target
.
oid
],
tree:
tree_id
,
committer:
user
,
author:
user
)
end
it
'does not raise an error'
do
commit
=
create_commit_with_invalid_utf8_path
expect
{
repository
.
list_last_commits_for_tree
(
commit
,
'.'
,
offset:
0
)
}.
not_to
raise_error
end
end
end
describe
'#last_commit_for_path'
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