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
597ea72a
Commit
597ea72a
authored
Jul 19, 2017
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Gitaly related conflicts
parent
41426268
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
58 deletions
+0
-58
lib/gitlab/git/branch.rb
lib/gitlab/git/branch.rb
+0
-36
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+0
-8
lib/gitlab/gitaly_client/ref_service.rb
lib/gitlab/gitaly_client/ref_service.rb
+0
-4
spec/lib/gitlab/gitaly_client/commit_service_spec.rb
spec/lib/gitlab/gitaly_client/commit_service_spec.rb
+0
-4
spec/services/git_push_service_spec.rb
spec/services/git_push_service_spec.rb
+0
-6
No files found.
lib/gitlab/git/branch.rb
View file @
597ea72a
...
...
@@ -3,44 +3,8 @@
module
Gitlab
module
Git
class
Branch
<
Ref
<<<<<<<
HEAD
def
initialize
(
repository
,
name
,
target
)
if
target
.
is_a?
(
Gitaly
::
FindLocalBranchResponse
)
target
=
target_from_gitaly_local_branches_response
(
target
)
end
super
(
repository
,
name
,
target
)
end
def
target_from_gitaly_local_branches_response
(
response
)
# Git messages have no encoding enforcements. However, in the UI we only
# handle UTF-8, so basically we cross our fingers that the message force
# encoded to UTF-8 is readable.
message
=
response
.
commit_subject
.
dup
.
force_encoding
(
'UTF-8'
)
# NOTE: For ease of parsing in Gitaly, we have only the subject of
# the commit and not the full message. This is ok, since all the
# code that uses `local_branches` only cares at most about the
# commit message.
# TODO: Once gitaly "takes over" Rugged consider separating the
# subject from the message to make it clearer when there's one
# available but not the other.
hash
=
{
id:
response
.
commit_id
,
message:
message
,
authored_date:
Time
.
at
(
response
.
commit_author
.
date
.
seconds
),
author_name:
response
.
commit_author
.
name
.
dup
,
author_email:
response
.
commit_author
.
email
.
dup
,
committed_date:
Time
.
at
(
response
.
commit_committer
.
date
.
seconds
),
committer_name:
response
.
commit_committer
.
name
.
dup
,
committer_email:
response
.
commit_committer
.
email
.
dup
}
Gitlab
::
Git
::
Commit
.
decorate
(
hash
)
=======
def
initialize
(
repository
,
name
,
target
,
target_commit
)
super
(
repository
,
name
,
target
,
target_commit
)
>>>>>>>
upstream
/
master
end
end
end
...
...
lib/gitlab/git/repository.rb
View file @
597ea72a
...
...
@@ -808,19 +808,11 @@ module Gitlab
end
def
gitaly_ref_client
<<<<<<<
HEAD
@gitaly_ref_client
||=
Gitlab
::
GitalyClient
::
Ref
.
new
(
self
)
end
def
gitaly_commit_client
@gitaly_commit_client
||=
Gitlab
::
GitalyClient
::
Commit
.
new
(
self
)
=======
@gitaly_ref_client
||=
Gitlab
::
GitalyClient
::
RefService
.
new
(
self
)
end
def
gitaly_commit_client
@gitaly_commit_client
||=
Gitlab
::
GitalyClient
::
CommitService
.
new
(
self
)
>>>>>>>
upstream
/
master
end
private
...
...
lib/gitlab/gitaly_client/ref_service.rb
View file @
597ea72a
...
...
@@ -72,12 +72,8 @@ module Gitlab
Gitlab
::
Git
::
Branch
.
new
(
@repository
,
encode!
(
gitaly_branch
.
name
.
dup
),
<<<<<<<
HEAD
:lib
/
gitlab
/
gitaly_client
/
ref
.
rb
gitaly_branch
=======
gitaly_branch
.
commit_id
,
commit_from_local_branches_response
(
gitaly_branch
)
>>>>>>>
upstream
/
master
:lib
/
gitlab
/
gitaly_client
/
ref_service
.
rb
)
end
end
...
...
spec/lib/gitlab/gitaly_client/commit_service_spec.rb
View file @
597ea72a
require
'spec_helper'
<<<<<<<
HEAD
:spec
/
lib
/
gitlab
/
gitaly_client
/
commit_spec
.
rb
describe
Gitlab
::
GitalyClient
::
Commit
do
=======
describe
Gitlab
::
GitalyClient
::
CommitService
do
>>>>>>>
upstream
/
master
:spec
/
lib
/
gitlab
/
gitaly_client
/
commit_service_spec
.
rb
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:repository
)
{
project
.
repository
}
let
(
:repository_message
)
{
repository
.
gitaly_repository
}
...
...
spec/services/git_push_service_spec.rb
View file @
597ea72a
...
...
@@ -120,15 +120,9 @@ describe GitPushService, services: true do
context
"the commit"
do
subject
{
push_data_from_service
(
project
,
user
,
oldrev
,
newrev
,
ref
)[
:commits
].
first
}
<<<<<<<
HEAD
it
{
is_expected
.
to
include
(
id:
commit
.
id
)
}
it
{
is_expected
.
to
include
(
message:
commit
.
safe_message
)
}
it
{
expect
(
subject
[
:timestamp
].
in_time_zone
).
to
eq
(
commit
.
date
.
in_time_zone
)
}
=======
it
{
is_expected
.
to
include
(
id:
@commit
.
id
)
}
it
{
is_expected
.
to
include
(
message:
@commit
.
safe_message
)
}
it
{
expect
(
subject
[
:timestamp
].
in_time_zone
).
to
eq
(
@commit
.
date
.
in_time_zone
)
}
>>>>>>>
upstream
/
master
it
do
is_expected
.
to
include
(
url:
[
...
...
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