diff options
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index fb20d91fa20..0f47e6d3936 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -136,7 +136,7 @@ class MergeRequest < ApplicationRecord before_validation :set_draft_status - after_create :ensure_merge_request_diff + after_create :ensure_merge_request_diff, unless: :skip_ensure_merge_request_diff after_update :clear_memoized_shas after_update :reload_diff_if_branch_changed after_commit :ensure_metrics, on: [:create, :update], unless: :importing? @@ -146,6 +146,10 @@ class MergeRequest < ApplicationRecord # It allows us to close or modify broken merge requests attr_accessor :allow_broken + # Temporary flag to skip merge_request_diff creation on create. + # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/100390 + attr_accessor :skip_ensure_merge_request_diff + # Temporary fields to store compare vars # when creating new merge request attr_accessor :can_be_created, :compare_commits, :diff_options, :compare |