Prepare Repository#fetch_source_branch for migration
What does this MR do?
This change refactors Gitlab::Git so that interactions with another repository than the one a request is about go through the new RemoteRepository class. In particular we are focussed on preparing Gitlab::Git::Repository#fetch_source_branch for migration to Gitaly.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Methods like fetch_source_branch copy data from one repository to another. In the context of Gitaly we cannot assume we have local disk access to both repositories. This refactor changes things so that we have a separate class, RemoteRepository, to access repositories we do not have disk access to.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes gitaly#681 (closed)
Edited by Jacob Vosmaer