UpdateRemoteMirror might force push over diverged refs even if KeepDivergentRefs is set
UpdateRemoteMirror
has KeepDivergentRefs
parameter which should prevent the RPC from force pushing over references that have diverged from the mirror source. There is a time of check/time of use race as the RPC handler first fetches the remote references and later force pushes the references to the mirror. If the branch diverges on the mirror between the check and the force push, the changes on the mirror would be overwritten.
UpdateRemoteMirror
should use --force-with-lease
to only force push refs over if they still match what they were at the time of the check.