Follow-up from "Move git operations for UpdateRemoteMirrorService into Gitlab::Git"
The following discussions from !3824 (merged) should be addressed:
-
@eReGeBe started a discussion: (+1 comment) @rdavila do you remember why we need this
project.repository.is_ancestor?(remote_ref_id, default_branch_id)check? I see you added it on fc28ad13 saying "Don't delete branches/tags that contains changes only in the remote mirror", but wouldn't we need to compare it to the local branch id, and not always to thedefault_branch_id? -
@eReGeBe started a discussion: @tiagonbotelho I see you added this example initially on 806fc946, do you recall why does it expect the repository
not_to receive(:delete_remote_branches)if the example isit 'deletes the protected branch from remote repo'?