[Mesa-dev] Rename "master" branch to "main"?

Eric Engestrom eric at engestrom.ch
Thu Aug 6 12:17:18 UTC 2020


On Tuesday, 2020-08-04 11:27:43 -0500, Jason Ekstrand wrote:
> On Tue, Aug 4, 2020 at 5:54 AM Daniel Stone <daniel at fooishbar.org> wrote:
> >
> > Hi,
> >
> > On Mon, 3 Aug 2020 at 17:16, Jason Ekstrand <jason at jlekstrand.net> wrote:
> > > On Mon, Aug 3, 2020 at 11:12 AM Kenneth Graunke <kenneth at whitecape.org> wrote:
> > > > Seems reasonable to me...in the old Subversion days, we called it
> > > > 'trunk'...then 'master' with Git...but calling the main development
> > > > branch 'main' is arguably the simplest and most descriptive term.
> > > >
> > > > One thing we'll have to coordinate: getting Gitlab CI / Marge and the
> > > > Intel Mesa CI to switch over at the right time, so we don't end up
> > > > breaking/interrupting those services.  Should be easy, just requires
> > > > a bit of coordination.
> > >
> > > Yup, I threw Daniel onto the CC of this e-mail explicitly for that
> > > reason.  We may also want to coordinate with the rest of fd.o so that
> > > everyone chooses the same new mainline branch name.  I just added
> > > Michel to the CC as he's doing lots of CI stuff and might be a good
> > > person to help coordinate there.  I certainly don't want to pull the
> > > rug out from under anyone.
> >
> > That's fine by me. I think 'main' is a perfectly fine name, and we'd
> > be happy to encode that in whatever useful way. I suppose the main
> > problem with a global nature is the very disparate nature of the
> > projects - getting everyone to move at once before we throw the switch
> > would require a great deal of effort. But we can figure it out.
> 
> I don't think we need to get everyone to sync up necessarily.  It
> probably would be good if we had consistency across projects as to
> what the primary branch is called.  It may also matter from a GitLab
> configuration perspective.  There's some chatter on the GitLab issue
> tracker about allowing different default branch names and I could
> imagine them even adding a per-install default default name.  I don't
> think it's a big deal but something to consider.  Here's the GitLab
> issue for this:
> 
> https://gitlab.com/gitlab-org/gitlab/-/issues/220906
> 
> > As for retargeting MRs; if it can be done manually, then it can be
> > done automatically as well. We can figure out a way to just
> > automatically retarget all the outstanding MRs, but a couple of weeks'
> > leadtime would be good right now.
> 
> It sounds like people are ok with manually re-targetting if they have
> to.  However, if there's a script I can run or coordinate with you to
> run, that'd probably make the process smoother.  As I've said before,
> I don't think we need to rush so if you think that's something someone
> could get put together in a couple weeks or a month, I think it's fine
> to wait for it.  Likely, Mesa isn't the only project on fd.o that's
> going to make a change like this so such a script would probably be
> pretty useful.

There is an upstream issue about having gitlab handle the branch
renaming and provide redirections, MR re-targeting, etc.

https://gitlab.com/gitlab-org/gitlab/-/issues/233427

If we wait for this feature instead of doing it by hand, it could be
much less disruptive to devs and everyone downstream from us, but
there's also no telling how long this will take.

---

Another option might be to keep `master` updated as a read-only copy of
`main`, by having a post-receive hook that looks like this:

   cat refs/heads/main > refs/heads/master

(crude script, can be optimized to only run on `main` changes, but also
this is trivially fast so it might be ok to just leave it like this)

Since we're planning on keeping `master` around forever, why not have it
follow `main`?


More information about the mesa-dev mailing list