Renaming The Default Branch

Hi Everyone,

Many tech communities, including GitHub and Git, have moved away from term “master branch” and replaced it with “main branch” in an
effort to remove unnecessary references to slavery and use more inclusive terms. This was also discussed on the LLVM-dev mailing list

and there was strong consensus from LLVM Developers’ that the LLVM Project should also rename our master branch as well. Now that
an industry standard name has been selected by GitHub, the LLVM Project can begin the renaming process of the default branch to “main”.

This change will occur at 06:00GMT on Monday December 7, 2020 (time is GMT, please adjust for your local timezone).

To make this as easy as possible we plan to do the following prior to November 20, 2020:

  • Create a new branch named ‘test-main’ on the llvm-project repository
  • This branch will be read-only except for the llvmbot account
  • Setup a GitHub action to mirror commits from ‘master’ to ‘test-main’ automatically
  • Allow the configuration to soak for a few days to ensure everything works
  • Create a new branch named “main” on the llvm-project repository
  • This branch will be readonly initially
  • Reuse the previous Github Action to mirror master to main
  • This configuration will stay in place until cutover takes place on Dec. 7

On December 7, 2020:

  • We will lock the master branch and change it to be readonly (with the exception of llvmbot)
  • Switch the GitHub action to mirror commits from the new main branch back to the old master branch
  • Make a few test commits to ensure the GitHub action is functioning as expected
  • Open the main branch to commits from community members
  • In parallel we will begin to work through the rest of the llvm organization repositories to update branch names as well
  • We will update the developer policy to reflect the change in workflow

On January 7, 2021:

  • We will remove the ‘master’ branch from all repositories in the llvm organization

As we work towards December 7, 2020 we are going to set up a test of this system on a fork of the llvm-project
in order to simulate the cutover. If we encounter any issues we will update the community on llvm-dev.
We expect the llvm-project repository to be unavailable to developers for approximately 1 hour while the
switch is made. Lockout will occur promptly at 06:00GMT on the 7th. Certainly if we finish sooner, we will
update llvm-dev to let everyone know the repository is available for use once again.

We know this has been a long process and we want to thank everyone for their patience. We look forward to getting
the project completed soon.

Respectfully,

Mike Edwards
On Behalf Of the LLVM Foundation

Hi Everyone,

Many tech communities, including GitHub and Git, have moved away from term “master branch” and replaced it with “main branch” in an
effort to remove unnecessary references to slavery and use more inclusive terms. This was also discussed on the LLVM-dev mailing list

and there was strong consensus from LLVM Developers’ that the LLVM Project should also rename our master branch as well. Now that
an industry standard name has been selected by GitHub, the LLVM Project can begin the renaming process of the default branch to “main”.

This change will occur at 06:00GMT on Monday December 7, 2020 (time is GMT, please adjust for your local timezone).

To make this as easy as possible we plan to do the following prior to November 20, 2020:

  • Create a new branch named ‘test-main’ on the llvm-project repository
  • This branch will be read-only except for the llvmbot account
  • Setup a GitHub action to mirror commits from ‘master’ to ‘test-main’ automatically
  • Allow the configuration to soak for a few days to ensure everything works
  • Create a new branch named “main” on the llvm-project repository
  • This branch will be readonly initially
  • Reuse the previous Github Action to mirror master to main
  • This configuration will stay in place until cutover takes place on Dec. 7

On December 7, 2020:

  • We will lock the master branch and change it to be readonly (with the exception of llvmbot)
  • Switch the GitHub action to mirror commits from the new main branch back to the old master branch
  • Make a few test commits to ensure the GitHub action is functioning as expected
  • Open the main branch to commits from community members
  • In parallel we will begin to work through the rest of the llvm organization repositories to update branch names as well
  • We will update the developer policy to reflect the change in workflow

On January 7, 2021:

  • We will remove the ‘master’ branch from all repositories in the llvm organization

As we work towards December 7, 2020 we are going to set up a test of this system on a fork of the llvm-project
in order to simulate the cutover. If we encounter any issues we will update the community on llvm-dev.
We expect the llvm-project repository to be unavailable to developers for approximately 1 hour while the
switch is made. Lockout will occur promptly at 06:00GMT on the 7th. Certainly if we finish sooner, we will
update llvm-dev to let everyone know the repository is available for use once again.

We know this has been a long process and we want to thank everyone for their patience. We look forward to getting
the project completed soon.

Respectfully,

Mike Edwards
On Behalf Of the LLVM Foundation

Awesome - thanks for making the plan/getting this underway!

I notice that on https://github.com/github/renaming it says:
“”“If you haven’t renamed your default branch yet, consider waiting until later this year. We’re investing in tools to make renaming the default branch of an existing repository a seamless experience for both maintainers and contributors.”“”

Is that not relevant/not useful for us to wait for that?

They expand on this at the end of the document: https://github.com/github/renaming#later-this-year-seamless-move-for-existing-repositories-
None of the items seemed particularly helpful. The main feature I’d have wanted would have a server side mirroring of main to master, but we can emulate this with a github action (as Mike plans to do).

I’m very supportive of this switch, but I do think that the timing leaves a bit to be desired. Many people will be taking time off for the holidays at the end of the year, and forcing a change to be complete by week 1 of the new year (since January 7 is part of our first work-week in 2021), might make things more difficult than they should be. This is also problematic because lots of organizations might be subject to production freezes during this time, so they won’t be able to do as much testing as they would want before having to switch over. Could we perhaps push back the end date by 2-4 weeks to ensure that nobody has to work through the holidays and/or have an extra stressful first work-week of 2021?

Thanks,
Steve

This timing actually is likely to be more convenient for my downstreams, as most of the devs will be away.That way we can ‘ease’ into our transition with a limited number of devs being affected by it…

That said, from a downstream-perspective, it looks like we’ll still be keeping ‘master’ updated for a while, right?

We will lock the master branch and change it to be readonly (with the exception of llvmbot)

Is that what I should take from that?

This timing actually is likely to be more convenient for my downstreams, as most of the devs will be away.That way we can ‘ease’ into our transition with a limited number of devs being affected by it…

That said, from a downstream-perspective, it looks like we’ll still be keeping ‘master’ updated for a while, right?

We will lock the master branch and change it to be readonly (with the exception of llvmbot)

Is that what I should take from that?

“”"
On January 7, 2021:

  • We will remove the ‘master’ branch from all repositories in the llvm organization

“”"

^ This is the part that will likely break other users, and it seems that master will only get updated from December 7 → January 7. After that, it’s gone.

Steve

Ah, I see what you mean. I would have no problem with January 7th being pushed back a while if that helps out your transition. Would that be possible Mike?

Ah, I see what you mean. I would have no problem with January 7th being pushed back a while if that helps out your transition. Would that be possible Mike?

The main reason for holding such a tight schedule is we do not want this to drag on forever. I will freely admit, in my zeal to get this project completed, I overlooked the Holiday aspect. My apologies. So, how about we say we will leave the ‘master’ branch available in read-only mode until January 28th, 2021? This should give everyone plenty of time to make the transition.

Stephen, does that help you out?

That sounds like better timing. We’ll start our own renaming process for Android once this is available in December, so I wasn’t too worried about us getting everything in order. I was more concerned for smaller downstream LLVM developers who might not have the same availability/resources to adapt. Starting 2021 out with a bunch of failing infrastructure doesn’t seem pleasant, so hopefully this will be better for them as well.

Thanks,
Steve

How does the updated schedule for renaming the Default Branch mesh with the creation of the release 12.0 branch? Will the renaming process be completed before the release 12.0 branch is created?

Thanks,

Todd Snider

Ah, I see what you mean. I would have no problem with January 7th being pushed back a while if that helps out your transition. Would that be possible Mike?

The main reason for holding such a tight schedule is we do not want this to drag on forever. I will freely admit, in my zeal to get this project completed, I overlooked the Holiday aspect. My apologies. So, how about we say we will leave the ‘master’ branch available in read-only mode until January 28th, 2021? This should give everyone plenty of time to make the transition.

Do we expect github to fail to meet their claimed timeline of providing a seamless workflow for renaming the main branch by the end of the year?

If we’re delaying until the end of January anyway, we’ll probably get to our goal faster if we wait for the github main branch renaming facility to be available and use it than if we invent our own process.

Ah, I see what you mean. I would have no problem with January 7th being pushed back a while if that helps out your transition. Would that be possible Mike?

The main reason for holding such a tight schedule is we do not want this to drag on forever. I will freely admit, in my zeal to get this project completed, I overlooked the Holiday aspect. My apologies. So, how about we say we will leave the ‘master’ branch available in read-only mode until January 28th, 2021? This should give everyone plenty of time to make the transition.

Do we expect github to fail to meet their claimed timeline of providing a seamless workflow for renaming the main branch by the end of the year?

If we’re delaying until the end of January anyway, we’ll probably get to our goal faster if we wait for the github main branch renaming facility to be available and use it than if we invent our own process.

The only delay is the deletion of the ‘master’ branch. The move to the new ‘main’ branch will still happen on December 7, 2020. Several people have looked into the tooling GitHub will offer and I believe the solution Tom Stellard has come up with is fine for our purposes. Mehdi expanded on this in a previous response to a similar question posed by James.

Hi,
I have added a page to the Foundation’s website which will provide updates on the progress of renaming the default branch. The page may be found here: https://foundation.llvm.org/docs/branch-rename/ . As of right now, we are on track to change the default branch to main on December 7th. Hope everyone is well and staying safe.

Thanks,
Mike

Hello,
This is a reminder the process to rename the default branch to main will begin in approximately 10 minutes. An update will be sent to the lists once the process has been completed and the branch is open to receive new commits.

Thanks,
Mike Edwards

Hello,
The change to the default branch setting has been completed. The new default branch for the llvm-project is now ‘main’. Pushes to the ‘master’ branch will no longer be accepted. Please update your workflow to use the new ‘main’ branch. Thank you for your patience and cooperation during this process. I hope everyone has a nice, productive day.

Respectfully,

Mike Edwards
On Behalf Of the LLVM Foundation

Hi,

The change to the default branch setting has been completed. The new
default branch for the llvm-project is now 'main'. Pushes to the 'master'
branch will no longer be accepted. Please update your workflow to use the
new 'main' branch. Thank you for your patience and cooperation during this
process. I hope everyone has a nice, productive day.

I just pushed a patch to the new main branch, and I've noticed these issues:

- The master branch isn't updated to reflect this. Afaik it was supposed that the master branch, while read only, would still receive updates until it's being discontinued - or did I misunderstand that bit?

- Phabricator doesn't seem to pick up on commits to master, and doesn't autoclose reviews based on pushed patches. I guess this would be fixed by either making it track the main branch, or if new commits are mirrored into the previous branch until Phabricator is switched?

// Martin

Hi Martin,

It seems it's in the `master` branch:
https://github.com/llvm/llvm-project/commit/78a57069b53a08d5aef98a8472fcfa73dbbc8771

So, is the problem resolved?