Python/cpython zombie `master` branch 🧟‍♂️

Hi there, we migrated python/cpython from master to main back in May with some adventures. It worked ever since until Oct 8th.

Somebody pushed master back to the repository:

We are sadly unable to delete it as Github rejects the operation, claiming the branch is being renamed right now:

$ git push upstream --delete master
To github.com:python/cpython.git
 ! [remote rejected]       master (branch master is being renamed)
error: failed to push some refs to 'github.com:python/cpython.git'

The branch also doesn’t appear in the list of all branches: Branches · python/cpython · GitHub, probably for the same reason (it thinks it’s being renamed).

But it can be successfully pulled:

$ git fetch upstream master
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (52/52), done.
remote: Total 75 (delta 52), reused 52 (delta 52), pack-reused 23
Unpacking objects: 100% (75/75), 82.45 KiB | 861.00 KiB/s, done.
From github.com:python/cpython
 * branch                  master     -> FETCH_HEAD
   518f8b5dd5..b108db63e0  master     -> upstream/master

$ git checkout --track upstream/master
Branch 'master' set up to track remote branch 'master' from 'upstream'.
Switched to a new branch 'master'

We’d like it to disappear for good, thank you very much.

1 Like

@aharpole for an attention bump (given you handled Renaming Python "master" branch to "main" (1.4k PRs & 700 repositories) triggered server HTTP error 500 - #3 by jcgoble3).

Thanks for the report, @gpshead!

There was an extra record of the branch rename that was stuck in the “started” state. I manually marked that one as finished; if you try to delete master again it should permit that. Let me know if you have any further issues with this!

1 Like

Thank you very much, branch successfully deleted!

1 Like