git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Rename offensive terminology (master)

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 5, 2020, 23:16 UTC
Message-ID
<20200505231641.GH6530@camp.crustytoothpaste.net>
In-Reply-To
<CAOAHyQwyXC1Z3v7BZAC+Bq6JBaM7FvBenA-1fcqeDV==apdWDg@mail.gmail.com>
On 2020-05-04 at 17:20:33, Simon Pieters wrote:
Show 17 quoted lines
> "master" is an offensive term, as it can be interpreted as being
> slavery-origin terminology. See
> https://en.wikipedia.org/wiki/Master/slave_(technology)#Terminology_concerns
> 
> The Python programming language, and various other projects, have
> taken a stance and moved away from offensive terminology including
> "master". See https://bugs.python.org/issue34605
> 
> When different projects using git decide to move away from "master" as
> the name of their main branch, inconsistency ensues between projects.
> See https://github.com/desktop/desktop/issues/6478 (and "Related
> Issues and Projects").
> 
> To avoid offensive terminology and to avoid further inconsistency, I
> think git should use a different branch name than "master" when
> initiating a repo. I don't have a strong opinion, but I like "main"
> since it shares the first two characters and it's shorter.

I've been busy and haven't had much time to respond to this, but I've gotten some feedback from other people on this issue and so I'll share a few thoughts.

Others have pointed out that "master" meaning a canonical source may not share the problematic origins mentioned above. From feedback I've received, I get the impression that "master", even though from a different origin, brings the idea of human bondage and suffering to mind for a non-trivial number of people, which of course was not the intention and is undesirable. I suspect if we were making the decision today, we'd pick another name, since that's not what we want people to think of when they use Git.

Clearly we have compatibility concerns to consider though, so if we decided to make a change, we'd probably want to make it in a 3.0, which as far as I'm aware hasn't been discussed yet. I also wondered what such a change would involve, so I did some research.

It appears that if we made the obvious one-line change to builtin/init-db.c, we'd have 304 tests that fail, which is about a third of our test suite. I haven't examined any of these tests, so I don't know what would be involved in changing them. I imagine a project to do so would involve setting an environment variable in the test setup code (e.g., MAIN_BRANCH) and replacing instances of "master" with that until everything works with an alternate value of that variable. Picking the new name itself could be deferred until later, and we could choose from some popular alternatives.

There's also the documentation, which at first glance seems mostly to be examples, many of which could be changed to any suitable branch name. There are a large number of those cases and someone would have to audit them all.

So it looks like this would be a reasonable amount of work for someone if they decided to pick it up as a project. Since I have limited free time and am working on the SHA-256 transition, I won't be doing this, but if someone did pick it up, I would be happy to do some reviews, provide feedback, and include a few patches while doing other work in the area.

I realize there isn't agreement on a direction forward or whether this is worth doing at all, but since Git usually operates by providing feedback on an initial set of patches, I thought I'd sketch out what that might look like for folks who were interested.

I should point out that it's also possible for users who dislike the current name to use a template to change the default branch name like so (using the proposed "main"):

  mkdir -p ~/Templates/git
  cp -a /usr/share/git-core/templates/* ~/Templates/git
  echo 'ref: refs/heads/main' > ~/Templates/git/HEAD
  git config --global init.templateDir ~/Templates/git

Then "git init" will set your default branch to "main" instead of "master". This does have the weirdness that it claims it's reinitializing your repository, but otherwise appears to work. That is of course orthogonal to changing Git itself, but is an option for folks who'd like to make a change now.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Randall S. BeckerNext: Simon Pieters
Message 8 of 140 in “Rename offensive terminology (master)”
  1. Simon PietersMay 4, 2020
  2. Robert P. J. DayMay 4, 2020
  3. N6GhostMay 4, 2020
  4. Konstantin RyabitsevMay 4, 2020
  5. Simon PietersMay 4, 2020
  6. Robert P. J. DayMay 4, 2020
  7. Randall S. BeckerMay 4, 2020
  8. brian m. carlsonMay 5, 2020
  9. Simon PietersJun 9, 2020
  10. Junio C HamanoJun 9, 2020
  11. demerphqJun 9, 2020
  12. Johannes SixtJun 9, 2020
  13. Junio C HamanoJun 9, 2020
  14. Simon PietersJun 9, 2020
  15. Junio C HamanoJun 9, 2020
  16. Simon PietersJun 9, 2020
  17. Robert P. J. DayJun 10, 2020
  18. Kevin SwintonJun 10, 2020
  19. Don Goodman-WilsonJun 10, 2020
  20. Konstantin RyabitsevJun 10, 2020
  21. Sérgio Augusto ViannaJun 14, 2020
  22. Sérgio Augusto ViannaJun 14, 2020
  23. Junio C HamanoJun 14, 2020
  24. Sérgio Augusto ViannaJun 14, 2020
  25. Don Goodman-WilsonJun 14, 2020
  26. Don Goodman-WilsonJun 14, 2020
  27. Sergey LapinJun 14, 2020
  28. Sergey LapinJun 14, 2020
  29. Sérgio Augusto ViannaJun 14, 2020
  30. demerphqJun 16, 2020
  31. OlegJun 16, 2020
  32. Elijah NewrenJun 16, 2020
  33. Sergey LapinJun 17, 2020
  34. OlegJun 17, 2020
  35. Alex SmithJun 16, 2020
  36. Konstantin TokarevJun 16, 2020
  37. OlegJun 16, 2020
  38. Robert P. J. DayJun 16, 2020
  39. Sergey OrganovJun 17, 2020
  40. Konstantin RyabitsevJun 9, 2020
  41. Don Goodman-WilsonJun 9, 2020
  42. Sérgio Augusto ViannaJun 14, 2020
  43. brian m. carlsonJun 14, 2020
  44. Sérgio Augusto ViannaJun 14, 2020
  45. Johannes SchindelinJun 14, 2020
  46. Taylor BlauJun 15, 2020
  47. Sérgio Augusto ViannaJun 15, 2020
  48. brian m. carlsonJun 9, 2020
  49. Michal SuchánekJun 16, 2020
  50. Johannes SchindelinJun 10, 2020
  51. Edward ThomsonJun 10, 2020
  52. brian m. carlsonJun 10, 2020
  53. Michal SuchánekJun 11, 2020
  54. Don Goodman-WilsonJun 11, 2020
  55. Derrick StoleeJun 11, 2020
  56. Junio C HamanoJun 11, 2020
  57. Johannes SchindelinJun 14, 2020
  58. Michal SuchánekJun 15, 2020
  59. Philip OakleyJun 12, 2020
  60. Elijah NewrenJun 14, 2020
  61. Philip OakleyJun 14, 2020
  62. Sérgio Augusto ViannaJun 14, 2020
  63. Don Goodman-WilsonJun 14, 2020
  64. Sérgio Augusto ViannaJun 14, 2020
  65. Andrew ArdillJun 15, 2020
  66. J. Paul ReedJun 15, 2020
  67. Andrew ArdillJun 15, 2020
  68. Michal SuchánekJun 17, 2020
  69. Konstantin RyabitsevJun 14, 2020
  70. Sérgio Augusto ViannaJun 14, 2020
  71. Konstantin RyabitsevJun 14, 2020
  72. Sérgio Augusto ViannaJun 14, 2020
  73. Konstantin RyabitsevJun 14, 2020
  74. Philip OakleyJun 14, 2020
  75. demerphqJun 16, 2020
  76. Michal SuchánekJun 16, 2020
  77. demerphqJun 16, 2020
  78. Michal SuchánekJun 16, 2020
  79. Junio C HamanoJun 17, 2020
  80. Jonathan NiederJun 17, 2020
  81. Jonathan NiederJun 17, 2020
  82. demerphqJun 18, 2020
  83. OlegJun 18, 2020
  84. demerphqJun 18, 2020
  85. Konstantin RyabitsevJun 18, 2020
  86. demerphqJun 18, 2020
  87. Junio C HamanoJun 18, 2020
  88. Junio C HamanoJun 14, 2020
  89. Eric WongJun 14, 2020
  90. Junio C HamanoJun 14, 2020
  91. Jonathan NiederJun 15, 2020
  92. Sérgio Augusto ViannaJun 15, 2020
  93. James RamsayJun 15, 2020
  94. Elijah NewrenJun 15, 2020
  95. Elijah NewrenJun 15, 2020
  96. ZeeVriendJun 16, 2020
  97. OlegJun 17, 2020
  98. ZeeVriendJun 17, 2020
  99. OlegJun 18, 2020
  100. ZeeVriendJun 17, 2020
  101. Sérgio Augusto ViannaJun 13, 2020
  102. Sérgio Augusto ViannaJun 13, 2020
  103. Thomas AdamJun 14, 2020
  104. Michael Felt (aixtools)Jun 14, 2020
  105. George Of The JungleJun 14, 2020
  106. Johannes SchindelinJun 14, 2020
  107. Johannes SchindelinJun 14, 2020
  108. Sérgio Augusto ViannaJun 14, 2020
  109. Sérgio Augusto ViannaJun 15, 2020
  110. Sérgio Augusto ViannaJun 15, 2020
  111. Sérgio Augusto ViannaJun 15, 2020
  112. Sérgio Augusto ViannaJun 15, 2020
  113. Fang-Pen LinJun 16, 2020
  114. Sérgio Augusto ViannaJun 16, 2020
  115. Social Justice Movements [was: Rename offensive terminology (master)]Luke Kenneth Casson Leighton, Jun 21, 2020
  116. Gunnar LiljasJun 23, 2020
  117. WhinisJun 24, 2020
  118. lego_12239@rambler.ruJun 24, 2020
  119. Gunnar LiljasJun 26, 2020
  120. OlegJun 26, 2020
  121. Sérgio Augusto ViannaJun 15, 2020
  122. Alexandru PătrănescuJun 15, 2020
  123. Elijah NewrenJun 15, 2020
  124. Randall S. BeckerJun 15, 2020
  125. WhinisJun 16, 2020
  126. OlegJun 16, 2020
  127. Konstantin RyabitsevJun 16, 2020
  128. John TurnerJun 16, 2020
  129. Michal SuchánekJun 16, 2020
  130. WhinisJun 16, 2020
  131. Alex SmithJun 16, 2020
  132. Konstantin RyabitsevJun 16, 2020
  133. WhinisJun 16, 2020
  134. Sérgio Augusto ViannaJun 16, 2020
  135. OlegJun 16, 2020
  136. Konstantin RyabitsevJun 16, 2020
  137. OlegJun 16, 2020
  138. Konstantin RyabitsevJun 16, 2020
  139. Sergey LapinJun 16, 2020
  140. OlegJun 16, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.