Skip to content
Snippets Groups Projects

Fix wrong caching logic in ProcessRefChangesService

Merged Igor Drozdov requested to merge id-remove-memoize-on-processing-ref-changes into master
3 files
+ 25
10
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -42,7 +42,7 @@ module Git
push_service_class = push_service_class_for(ref_type)
create_bulk_push_event = changes.size > Gitlab::CurrentSettings.push_event_activities_limit
merge_request_branches = merge_request_branches_for(changes)
merge_request_branches = merge_request_branches_for(ref_type, changes)
changes.each do |change|
push_service_class.new(
@@ -74,8 +74,10 @@ module Git
Git::BranchPushService
end
def merge_request_branches_for(changes)
@merge_requests_branches ||= MergeRequests::PushedBranchesService.new(project, current_user, changes: changes).execute
def merge_request_branches_for(ref_type, changes)
return [] if ref_type == :tag
MergeRequests::PushedBranchesService.new(project, current_user, changes: changes).execute
end
end
end
Loading