summaryrefslogtreecommitdiff
path: root/app/services/merge_requests/conflicts
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/services/merge_requests/conflicts
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
downloadgitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/services/merge_requests/conflicts')
-rw-r--r--app/services/merge_requests/conflicts/base_service.rb5
-rw-r--r--app/services/merge_requests/conflicts/list_service.rb6
2 files changed, 8 insertions, 3 deletions
diff --git a/app/services/merge_requests/conflicts/base_service.rb b/app/services/merge_requests/conflicts/base_service.rb
index 402f6c4e4c0..70add2fdcb1 100644
--- a/app/services/merge_requests/conflicts/base_service.rb
+++ b/app/services/merge_requests/conflicts/base_service.rb
@@ -3,10 +3,11 @@
module MergeRequests
module Conflicts
class BaseService
- attr_reader :merge_request
+ attr_reader :merge_request, :params
- def initialize(merge_request)
+ def initialize(merge_request, params = {})
@merge_request = merge_request
+ @params = params
end
end
end
diff --git a/app/services/merge_requests/conflicts/list_service.rb b/app/services/merge_requests/conflicts/list_service.rb
index 30a493e91ce..575a6bfe95a 100644
--- a/app/services/merge_requests/conflicts/list_service.rb
+++ b/app/services/merge_requests/conflicts/list_service.rb
@@ -23,7 +23,11 @@ module MergeRequests
end
def conflicts
- @conflicts ||= Gitlab::Conflict::FileCollection.new(merge_request)
+ @conflicts ||=
+ Gitlab::Conflict::FileCollection.new(
+ merge_request,
+ allow_tree_conflicts: params[:allow_tree_conflicts]
+ )
end
end
end