Allow overwrite option to be modified for pull mirroring without deleting/re-adding
### Summary When force-pushing to a remote branch (in this case the master branch) on a repository that is mirrored by GitLab (pull mirror) the update fails: `The default branch (master) has diverged from its upstream counterpart and could not be updated automatically.` ### Steps to reproduce * Setup a new repository in GitLab and enable pull mirroring from another (remote) repository * Wait until the initial pull has completed * Force push to the master branch in the remote repository * Either wait or force mirror update * Observe e.g. "Failed to update 11 minutes ago. Last successful update 2 months ago. " on the repository's project tab * Observe "The default branch (master) has diverged from its upstream counterpart and could not be updated automatically." on the /mirror page ### Expected behavior A mirror should always be in sync with its (authoritative) source ### Actual behavior GitLab fails to keep the mirror in sync ### Relevant logs and/or screenshots Example repository: https://gitlab.com/HearthSim/HSReplay.net https://gitlab.com/HearthSim/HSReplay.net/mirror ### Output of checks n/a (occuring on gitlab.com) #### Results of GitLab application Check n/a (occuring on gitlab.com) #### Results of GitLab environment info n/a (occuring on gitlab.com) ### Possible fixes - Always overwrite mirrors with changes from the remote repository - Add a checkbox whether to overwrite the mirror with changes from the remote repository - Add a button to do a one-time forced overwrite on the /mirror page
issue