Skip to content

Simplify Git interactions in AfterImportService

Jacob Vosmaer requested to merge delete-branches-with-prefixes into master

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?

What are the relevant issue numbers?

Edited by Andrew Newdigate

Merge request reports