[VOTE] Switch 'master' to 'main' branch for repositories

Paul Spooren mail at aparcar.org
Thu Mar 2 09:01:50 PST 2023

Hi all,

I’m happy to see so many old faces still actively following the project and it's steering decisions!

My considerations:

- Based on this email on desktop-devel-list the `master` branch origins in a `master/slave` concept, not a `master-copy` concept.


- SFC, which we joined some time ago actively “supports and encourages projects to switch to branch names that are meaningful and inclusive”. Since they are somewhat our link society (money, trademark, more) I’d trust them on that matter, too.


- Creating a symbolic-ref inside the openwrt.git repository on git.openwrt.org allows people to use either main/master branch. 

git symbolic-ref refs/heads/main refs/heads/master

- Projects hosted on GitHub (packages, luci, …) allow branch renaming with automatic forwarding from master to main including re-targeting open pull requests.


- Sub-projects never use branches but commit hashes. We can modify branches there however we like without breaking things.


- Buildbots use a config.ini file containing the branch to work on. While this change would be optional due to the symbolic-ref, all it requires is s/branch = master/branch = main/ and a restart of the container. Restarting it happens often enough, whenever a target is added so one could just wait for that to minimize canceled builds.

- Other project we rely on switched away from master branch, too. They seem to be doing just fine so I’m not concerned that the OpenWrt project would handle it differently. Implementation examples (incomplete list):

  - LLVM abandoned master branch entirely https://github.com/llvm/llvm-project
  - Git mirrors main/master https://github.com/git/git/branches

I fully understand that people don’t want to do extra work within open source projects which they don’t find themselves necessary. However, when voting here I’d like people to consider that other people are fine putting in the “work” for using more inclusive language.

If Felix doesn’t have the time to work on that, I’m happy to jump in and do the step(s) in case this vote passes.

tl;dr I see valid political reasons reasons to switch and trivial technical issues.


> On 27. Feb 2023, at 08:05, Felix Fietkau <nbd at nbd.name> wrote:
> Hi all,
> More and more projects are switching their repositories to use the 'main' branch instead of the 'master' branch. This also includes many Linux upstream trees as well. Some trees are even removing their 'master' branches already.
> I think this is becoming more and more mainstream and expected of projects, so we should do the same.
> I would like to propose the following:
> 1. Change the git server side to automatically update the 'master' branch, whenever an update is pushed to 'main'.
> It's important to have a long transition period in order to avoid breaking downstream users' workflows.
> 2. Change the git server side to refuse a push to 'master' if 'main' exists. This avoid accidental branch divergence
> 3. Developers simply change their git configs to always push to 'main'
> Once this change is well established, we can look into removing 'master', but we should definitely take our time with that.
> - Felix
> _______________________________________________
> openwrt-adm mailing list
> openwrt-adm at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-adm

More information about the openwrt-adm mailing list