diff options
Diffstat (limited to 'app/services/merge_requests/conflicts')
-rw-r--r-- | app/services/merge_requests/conflicts/base_service.rb | 5 | ||||
-rw-r--r-- | app/services/merge_requests/conflicts/list_service.rb | 6 |
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 |