Fix diverged from upstream detection with pull_mirror_branch_prefix
What does this MR do?
The current Repository#diverged_from_upstream?
and Repository#up_to_date_with_upstream?
implementations don't catch diverged branches when pull_mirror_branch_prefix
is set. (see !17368 (merged))
This MR changes how those methods searches commits upstream.
It also adds more tests to the pull_mirror_branch_prefix
feature
related to gitlab-com/gl-infra/delivery#472 (closed)
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry - not needed, fixing a feature under feature flag
-
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and Testing
Edited by Alessio Caiazza