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
829b1d64
Commit
829b1d64
authored
Oct 16, 2019
by
John Cai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use original repository for list conflict call
parent
2ec6f251
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
lib/gitlab/gitaly_client/conflict_files_stitcher.rb
lib/gitlab/gitaly_client/conflict_files_stitcher.rb
+5
-2
lib/gitlab/gitaly_client/conflicts_service.rb
lib/gitlab/gitaly_client/conflicts_service.rb
+1
-1
spec/lib/gitlab/gitaly_client/conflict_files_stitcher_spec.rb
.../lib/gitlab/gitaly_client/conflict_files_stitcher_spec.rb
+1
-1
No files found.
lib/gitlab/gitaly_client/conflict_files_stitcher.rb
View file @
829b1d64
...
@@ -5,8 +5,11 @@ module Gitlab
...
@@ -5,8 +5,11 @@ module Gitlab
class
ConflictFilesStitcher
class
ConflictFilesStitcher
include
Enumerable
include
Enumerable
def
initialize
(
rpc_response
)
attr_reader
:gitaly_repo
def
initialize
(
rpc_response
,
gitaly_repo
)
@rpc_response
=
rpc_response
@rpc_response
=
rpc_response
@gitaly_repo
=
gitaly_repo
end
end
def
each
def
each
...
@@ -31,7 +34,7 @@ module Gitlab
...
@@ -31,7 +34,7 @@ module Gitlab
def
file_from_gitaly_header
(
header
)
def
file_from_gitaly_header
(
header
)
Gitlab
::
Git
::
Conflict
::
File
.
new
(
Gitlab
::
Git
::
Conflict
::
File
.
new
(
Gitlab
::
GitalyClient
::
Util
.
git_repository
(
header
.
repository
),
Gitlab
::
GitalyClient
::
Util
.
git_repository
(
gitaly_repo
),
header
.
commit_oid
,
header
.
commit_oid
,
conflict_from_gitaly_file_header
(
header
),
conflict_from_gitaly_file_header
(
header
),
''
''
...
...
lib/gitlab/gitaly_client/conflicts_service.rb
View file @
829b1d64
...
@@ -22,7 +22,7 @@ module Gitlab
...
@@ -22,7 +22,7 @@ module Gitlab
)
)
response
=
GitalyClient
.
call
(
@repository
.
storage
,
:conflicts_service
,
:list_conflict_files
,
request
,
timeout:
GitalyClient
.
long_timeout
)
response
=
GitalyClient
.
call
(
@repository
.
storage
,
:conflicts_service
,
:list_conflict_files
,
request
,
timeout:
GitalyClient
.
long_timeout
)
GitalyClient
::
ConflictFilesStitcher
.
new
(
response
)
GitalyClient
::
ConflictFilesStitcher
.
new
(
response
,
@gitaly_repo
)
end
end
def
conflicts?
def
conflicts?
...
...
spec/lib/gitlab/gitaly_client/conflict_files_stitcher_spec.rb
View file @
829b1d64
...
@@ -32,7 +32,7 @@ describe Gitlab::GitalyClient::ConflictFilesStitcher do
...
@@ -32,7 +32,7 @@ describe Gitlab::GitalyClient::ConflictFilesStitcher do
double
(
files:
[
double
(
header:
nil
,
content:
content_2
[
11
..-
1
])])
double
(
files:
[
double
(
header:
nil
,
content:
content_2
[
11
..-
1
])])
]
]
conflict_files
=
described_class
.
new
(
messages
).
to_a
conflict_files
=
described_class
.
new
(
messages
,
target_repository
.
gitaly_repository
).
to_a
expect
(
conflict_files
.
size
).
to
be
(
2
)
expect
(
conflict_files
.
size
).
to
be
(
2
)
...
...
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