In case of a git repository mirror, all branches are kept in sync all the time.
Trying to push out a particular refspec errors out with:
Failed to push to origin ☹
fatal: --mirror can't be combined with refspecs
Moreover, when a cherry-pick is pushed and the branch gets auto-deleted by cherry-picker, this introduces a dangerous situation for --mirror users. Again, with --mirror all branches are kept in sync. If I delete a branch locally from my ambv/cpython repository and then I push this change to GitHub, the remote branch will get automatically deleted on GitHub as well. So, if cherry-picker deletes a branch for PR-1, and then I push another unrelated change before PR-1 gets merged, PR-1 will get automatically closed by GitHub because the branch got deleted.
This change adds support for mirrors. Tested with:
In case of a git repository mirror, all branches are kept in sync all the time. Trying to push out a particular refspec errors out with:
Moreover, when a cherry-pick is pushed and the branch gets auto-deleted by
cherry-picker
, this introduces a dangerous situation for--mirror
users. Again, with--mirror
all branches are kept in sync. If I delete a branch locally from myambv/cpython
repository and then I push this change to GitHub, the remote branch will get automatically deleted on GitHub as well. So, ifcherry-picker
deletes a branch for PR-1, and then I push another unrelated change before PR-1 gets merged, PR-1 will get automatically closed by GitHub because the branch got deleted.This change adds support for mirrors. Tested with:
https://github.com/python/cpython/pull/92981 https://github.com/python/cpython/pull/94495 https://github.com/python/cpython/pull/94496 (pushing this one didn't auto-close the previous one)