"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Defaulting primary branch name to "main"
To:
Tracey Emery <tracey@traceyemery.net>
Cc:
Kurt Mosiejczuk <kurt@cranky.work>, gameoftrees <gameoftrees@openbsd.org>
Date:
Sat, 2 Nov 2019 09:56:36 +0100

Download raw body.

Thread
  • Mark Jamsek:

    Defaulting primary branch name to "main"

  • Stefan Sperling:

    Defaulting primary branch name to "main"

  • On Fri, Nov 01, 2019 at 02:47:23PM -0600, Tracey Emery wrote:
    > On Tue, Oct 29, 2019 at 07:02:49PM +0100, Stefan Sperling wrote:
    > > On Tue, Oct 29, 2019 at 01:24:01PM -0400, Kurt Mosiejczuk wrote:
    > > > OpenBSD cvs works on the "MAIN" branch by default. This diff moves got
    > > > to using "main" by default rather than "master". As a side benefit, it
    > > > also avoids using the potentially loaded term "master".
    > > 
    > > I am fine with this change. Apart from the negative connotations of
    > > the terminology, promoting the idea that branch names are always chosen
    > > by convention is good. Having a different default branch name than Git
    > > helps to spread the idea that branch names aren't necessarily the same
    > > everywhere.
    > > 
    > 
    > Is this going to require a new got branch rename function? It's going to
    > get confusing to go between got generated trees and git generated trees
    > when managing both with got. I don't know. Maybe it doesn't matter and
    > after time, everyone will get used to the change.
    
    The proposed change wouldn't affect existing repositories in any way.
    There is no need to rename existing branches because of this change.
    
    When a repository is cloned, names of references in the remote repository
    will be mapped to refs/heads/ 1:1. If your upstream repository has a 'master'
    branch it will still be called 'master' in your local repository, since
    'git clone' will map refs/remotes/origin/master to refs/heads/master.
    A future 'got clone' would not change branch names either.
    
    The change only affects the default value for new empty repositories.
    That means 'got init' and 'got import' would use refs/heads/main instead
    of refs/heads/master, unless the -b option is used to override this default.
    Such repositories will also interoperate with Git, which already offers a
    way of changing the name of the default branch away from 'master'.
    Kurt had an example of configuring Git like this somewhere, but I don't
    have time to look that up now.
    
    So basically if you never use 'got init' or 'got import' this change
    will not affect you, and backwards compatibility is not a problem.
    I think the hardest part of this change is to avoid getting people
    confused when they read the documentation.
    
    
    
  • Mark Jamsek:

    Defaulting primary branch name to "main"

  • Stefan Sperling:

    Defaulting primary branch name to "main"