Commit ff1f58ec authored by Douwe Maan's avatar Douwe Maan

Fix updating of branches in mirrored repository

parent aa2f58eb
v 8.5.0 (unreleased)
- Fix updating of branches in mirrored repository
v 8.4.1
- No EE-specific changes
......
......@@ -142,7 +142,7 @@ module ApplicationHelper
return false unless project.repository.branch_names.include?(event.branch_name)
# Skip if this was a mirror update
return false if project.mirror? && project.up_to_date_with_upstream?(event.branch_name)
return false if project.mirror? && project.repository.up_to_date_with_upstream?(event.branch_name)
true
end
......
......@@ -59,7 +59,7 @@ class GitPushService
@push_data = build_push_data(oldrev, newrev, ref)
branch_name = Gitlab::Git.ref_name(ref)
mirror_update = project.mirror? && project.up_to_date_with_upstream?(branch_name)
mirror_update = project.mirror? && project.repository.up_to_date_with_upstream?(branch_name)
EventCreateService.new.push(project, user, @push_data)
project.execute_hooks(@push_data.dup, :push_hooks)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment