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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
0b965528
Commit
0b965528
authored
Jan 23, 2018
by
Ahmad Sherif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GitalyClient::ConflictsService#conflicts? should return true for conflicts with missing side
parent
fbbd81ee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
lib/gitlab/gitaly_client/conflicts_service.rb
lib/gitlab/gitaly_client/conflicts_service.rb
+5
-0
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+7
-1
No files found.
lib/gitlab/gitaly_client/conflicts_service.rb
View file @
0b965528
...
...
@@ -25,6 +25,11 @@ module Gitlab
def
conflicts?
list_conflict_files
.
any?
rescue
GRPC
::
FailedPrecondition
# The server raises this exception when it encounters ConflictSideMissing, which
# means a conflict exists but its `theirs` or `ours` data is nil due to a non-existent
# file in one of the trees.
true
end
def
resolve_conflicts
(
target_repository
,
resolution
,
source_branch
,
target_branch
)
...
...
spec/models/repository_spec.rb
View file @
0b965528
...
...
@@ -365,12 +365,18 @@ describe Repository do
it
{
is_expected
.
to
be_truthy
}
end
context
'non-mergeable branches'
do
context
'non-mergeable branches
without conflict sides missing
'
do
subject
{
repository
.
can_be_merged?
(
'bb5206fee213d983da88c47f9cf4cc6caf9c66dc'
,
'feature'
)
}
it
{
is_expected
.
to
be_falsey
}
end
context
'non-mergeable branches with conflict sides missing'
do
subject
{
repository
.
can_be_merged?
(
'conflict-missing-side'
,
'conflict-start'
)
}
it
{
is_expected
.
to
be_falsey
}
end
context
'non merged branch'
do
subject
{
repository
.
merged_to_root_ref?
(
'fix'
)
}
...
...
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