Repository mirroring can fail with directory-file conflicts for references
Same as #4373 (closed), repository mirroring can fail with directory-file conflicts for references. We should have a look at the different mechanisms we have for mirroring and which of those are susceptible to this kind of conflict. We also need to carefully consider what to do about them given that depending on the configuration of the mirror, we may not actually be in a position to clean up any such conflict.