rename 'master' branch to 'main'
aiuto opened this issue · 17 comments
Because we should
Do you have experience with and guidance on how to do this without breaking all the tools and scripts that currently have the old branch name hardcoded? I acknowledge the importance of this, but I'm a bit at a loss on how to do this technically without breaking everything and everyone.
As a rough estimate of the work involved:
grep over our CI repo:
Plus the Google-internal stuff, the config in the Buildkite pipeline settings, the gitsync container, the Copybara setup, the Gerrit configuration / ACLs, pending pull requests, ...
This has to be very, very well coordinated (not only for this repo, even though it will be the hardest one, but also all the other repos in our org that are tested on CI).
See https://github.com/github/renaming for some guidance, specifically the mention that this will be more seamless later this year.
I had seen that page before, but not the "seamless" renaming coming later. I did this with rules_pkg a month ago and learned some pain points
- old PRs are against master. If you don't remember to rebase them off main, they go to the wrong branch.
- copybara pulls from 'master' by default, not from the default branch. Easy to fix, but the copy.bara.sky files all need update
- CI seems to work without change.
While we could do this for small repo, doing this for Bazel should probably wait until after the renaming tool comes.
Hey, would someone be able to elaborate on:
Because we should
?
Hey, would someone be able to elaborate on:
Because we should
The term master
is offensive to some people. There's nothing special about the name in how git treats branches - it was just historically the name for the first branch.
Hey @UebelAndre :)
Terms like "master / slave" or "whitelist / blacklist" are considered as offensive by many people (e.g. reminding them of slavery or racism). Obviously the intent of using these terms was not to provoke these negative feelings - they just somehow happened to become standard terms in the IT, but if there's a good neutral term available to replace them, I think it's just kind to consider doing so. Thus, there has been a recent movement to find better words for what we try to say! Here's some background: https://www.zdnet.com/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/.
Often the recommended replacements actually convey the intended meaning better than the historically used words - some examples:
- It's the
main
branch, because it's our... wait for it... main branch, where the development happens and release branches are cut from. :) - A "CI worker machine" is called like that, because it works on CI jobs.
- "allowlist" and "denylist" directly say what they're about (allowing or denying access) rather than relying on cultural background to understand "white" as "good" and "black" as "bad". Even if one doesn't see racism in the original words, the replacements are easier to understand for non-native speakers and people from cultures where this whole "white vs. black" idea doesn't exist.
@cherryland your offensive behavior and your wording is not acceptable. We're open to discussion in a civilised manner but you've clearly crossed the line by wishing others death and by insulting people.
We are dedicated to inclusiveness and will continue our effort on this issue. Your disagreement is noted, but your messages disqualify you from any further involvement.
(This is mostly a bikeshed comment, feel free to ignore if it would complicate the migration)
Would it be possible for the new name to be trunk
rather than main
? That's what the primary development branch was usually called before Git was released, and it's easier to grep for than main
because it doesn't conflict with the C/C++ default entry point.
I've noticed that quite a few repositories in the bazelbuild
org that haven't had any updates relevant to this GH issue. Instead of having them pop up in each repo. I think it'd mean a lot to have someone comb through them and make related updates. It would also be nice to see this ticket get actioned.
@philwo Many of the last few repositories (website, blog, and bazel itself) are going to require coordinated changes to production pipelines. Can you free up someone who knows the push pipelines for a few hours sometime in December to help out on this? I suspect that for every repository except bazel we can just do the rename at any time and not worry about people's pending PRs. For bazel, we should have a more coordinated rollover period so that everyone does not have to scramble to rebased their existing work.
There are notes about the steps needed in the fixit doc from earlier this year. I think they cover the process - except for some of the production things I might not know about.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage
) if you think this issue is still relevant or you are interested in getting the issue resolved.
Not stale.
@meteorcloudy We could do this, but it's just going to take the willpower to declare a day when people can't commit changes for an hour or two while we update the copybara scripts. How about July 3 or 4? No one in the US will be working, so that will reduce volume.
Good point, but I guess first we should have a rough estimation on who and what needs to be updated after the renaming and do a clear communication in advance with all impacted parties.