Simplify Git interactions in AfterImportService
Conversation: gitaly#526 (closed)
What does this MR do?
Refactor AfterImportService to be easier to migrate to Gitaly.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
The existing code, from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13766, implicitly needed two new RPC calls (all_ref_names_except
and delete_refs
). It also used a Ruby regular expression as a function argument.
The new code in this Merge Request combines the two functions into one method call, which can become just one RPC call. And it uses an array of strings as an argument, which is portable across programming languages.
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?
Edited by Andrew Newdigate