Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename master branch #7901

Closed
hoechenberger opened this issue Jun 15, 2020 · 29 comments · Fixed by #8758
Closed

Rename master branch #7901

hoechenberger opened this issue Jun 15, 2020 · 29 comments · Fixed by #8758

Comments

@hoechenberger
Copy link
Member

hoechenberger commented Jun 15, 2020

Hello,

amid the global BLM protests, it seems a number of free/open-source software projects are now reconsidering the naming of their main source-code management branch, historically called master in git. Microsoft seems to be actively working on bringing out-of-the-box support for other naming schemes to GitHub.

Despite its widespread use in the contexts of software development and hardware interfaces, the term "master" may be considered offensive by some. While one could argue that this perception entirely disregards context, I would argue that nothing is lost by dropping the name. I would consider moving to a different name as a token of support for the struggles of ethnic minorities and marginalized people; and it would be a public display of some (granted, cheap, but still visible) efforts to actively embrace an inclusive community. Lastly I would argue that our Code of Conduct actually doesn't leave us much of a choice anyway, as it clearly states we vow to use "welcoming and inclusive language". Now if the master term has been identified to be non-inclusive – regardless of whether we feel that this is true or not – it should be dropped.

Looking forward to reading your thoughts on this!

Best wishes,

–Richard

@cbrnr
Copy link
Contributor

cbrnr commented Jun 15, 2020

By all means change it if it makes people happy. GitHub will soon default to main anyway. However, I think that in this case the term master has nothing to do with master/slave (yes I know the BitKeeper background, but in a plain Git repo there is a master branch but no slave branch(es)). Same for blacklisting/whitelisting, which actually originates from the term black book (which were actual black books).

I'd only caution to wait until we know all implications of that name change. I've read that it can be non-trivial in some cases (e.g. it seems to be hard-coded for the docs), so let's do it only after GitHub releases detailed instructions how to do it.

@hoechenberger
Copy link
Member Author

hoechenberger commented Jun 15, 2020

Hi @cbrnr

However, I think that in this case the term master has nothing to do with master/slave (yes I know the BitKeeper background, but in a plain Git repo there is a master branch but no slave branch(es)). Same for blacklisting/whitelisting, which actually originates from the term black book (which were actual black books).

Yes I do agree, my perception is similar. But others seem to disagree, and I don't mind making a small change if that can help make them feel more welcome ☺️

I'd only caution to wait until we know all implications of that name change. I've read that it can be non-trivial in some cases (e.g. it seems to be hard-coded for the docs), so let's do it only after GitHub releases detailed instructions how to do it.

Yes absolutely, just wanted to raise this question now to get a small discussion going / get an idea of what others think.

@larsoner
Copy link
Member

Internally I don't think this change would be too difficult, but we should wait until GitHub makes it easy to redirect branch names to do this (last I looked it was not possible to redirect individual branches, only entire repos). Projects that rely on using https://github.com/mne-tools/mne-python/zipball/master or similar should have an opportunity to change to the new naming rather than just having things suddenly break.

@agramfort
Copy link
Member

agramfort commented Jun 16, 2020 via email

@GuillaumeFavelier
Copy link
Contributor

Not directly related but I should probably rename the time_viewer selected as reference in LinkViewer:

https://github.com/mne-tools/mne-python/blob/master/mne/viz/_brain/_timeviewer.py#L1221-L1222

@hoechenberger
Copy link
Member Author

Not directly related but I should probably rename the time_viewer selected as reference in LinkViewer:

https://github.com/mne-tools/mne-python/blob/master/mne/viz/_brain/_timeviewer.py#L1221-L1222

Heh. Do we have a good alternative? main, perhaps?

@GuillaumeFavelier
Copy link
Contributor

main or just simply reference should do the trick?

@hoechenberger
Copy link
Member Author

main or just simply reference should do the trick?

How about

        controller = self.time_viewers[0]  # select the first time viewer, which controls the scene
        value = controller.time_call.slider_rep.GetValue()

@cbrnr
Copy link
Contributor

cbrnr commented Jul 6, 2020

Feel free to rename, but master without slaves should be fine (because masters can also have apprentices).

@GuillaumeFavelier
Copy link
Contributor

Thanks all for the suggestions, I decided to rename into leader because it suits the behaviour perfectly. And sorry for the noise on the issue.

@hoechenberger
Copy link
Member Author

The Linux kernel developers just decided the use the following terms:

+For symbol names and documentation, avoid introducing new usage of
+'master / slave' (or 'slave' independent of 'master') and 'blacklist /
+whitelist'.
+
+Recommended replacements for 'master / slave' are:
+    '{primary,main} / {secondary,replica,subordinate}'
+    '{initiator,requester} / {target,responder}'
+    '{controller,host} / {device,worker,proxy}'
+    'leader / follower'
+    'director / performer'
+
+Recommended replacements for 'blacklist/whitelist' are:
+    'denylist / allowlist'
+    'blocklist / passlist'
+
+Exceptions for introducing new usage is to maintain a userspace ABI/API,
+or when updating code for an existing (as of 2020) hardware or protocol
+specification that mandates those terms. For new specifications
+translate specification usage of the terminology to the kernel coding
+standard where possible.

@cbrnr
Copy link
Contributor

cbrnr commented Jul 22, 2020

See https://github.com/github/renaming/

@hoechenberger
Copy link
Member Author

Just for reference, the VS Code Python Extension is chiming in now, too:
microsoft/vscode-python#13645

@cbrnr
Copy link
Contributor

cbrnr commented Jan 15, 2021

Should we go for it? https://docs.github.com/en/github/administering-a-repository/renaming-a-branch

@hoechenberger
Copy link
Member Author

hoechenberger commented Jan 16, 2021

Should we go for it? https://docs.github.com/en/github/administering-a-repository/renaming-a-branch

I just came here to ask the same, so: yes, let's do that!!

@agramfort
Copy link
Member

agramfort commented Jan 16, 2021 via email

@cbrnr
Copy link
Contributor

cbrnr commented Jan 16, 2021

What about starting with mne-testing-data? I've prepared all changes for this repo in #8758.

@agramfort
Copy link
Member

agramfort commented Jan 16, 2021 via email

@cbrnr
Copy link
Contributor

cbrnr commented Jan 16, 2021

Same, this is also low priority for me. I don't want to break anything, so I'd rather not do it unless others look very carefully at the changes.

@hoechenberger
Copy link
Member Author

hoechenberger commented Jan 16, 2021

The GH docs specifically say that all existing references to the old branch names will continue to work:

If you rename a branch, GitHub will automatically redirect links on GitHub.com that contain the old branch name to the equivalent link on the renamed branch. GitHub will also update branch protection policies, as well as the base branch for open pull requests and draft releases.

@cbrnr
Copy link
Contributor

cbrnr commented Jan 16, 2021

Yes, it should work without #8758. But what if it doesn't? Are there any larger projects that have already switched? I checked numpy, matplotlib, pandas, scipy, scikit-learn - they are all still using master.

@hoechenberger
Copy link
Member Author

hoechenberger commented Jan 16, 2021

Yes, it should work without #8758. But what if it doesn't? Are there any larger projects that have already switched? I checked numpy, matplotlib, pandas, scipy, scikit-learn - they are all still using master.

If it doesn't, we just rename it back. Should this not work? I don't understand the hesitation honestly… What do we even expect to break? In the worst case only a few URIs need to be adjusted

@hoechenberger
Copy link
Member Author

Are there any larger projects that have already switched? I

vscode-python has switched: microsoft/vscode-python#13645

@hoechenberger
Copy link
Member Author

hoechenberger commented Jan 16, 2021

I just renamed master to main on https://github.com/hoechenberger/questplus

After that I had to run locally:

git branch -m master main
git fetch origin
git branch -u origin/main main

All working now.

This is the message that GH displays when visiting the repo:
Screen Shot 2021-01-16 at 13 24 07

@cbrnr
Copy link
Contributor

cbrnr commented Jan 16, 2021

@hoechenberger and I will rename the branch this evening.

@drammock
Copy link
Member

I'd like to request that you do this next weekend instead of today, and that you announce it on the mailing list and forum first. Advance warning may avoid a lot of surprises and complaints.

@cbrnr
Copy link
Contributor

cbrnr commented Jan 16, 2021

OK, no problem!

@cbrnr
Copy link
Contributor

cbrnr commented Jan 17, 2021

I just renamed the master branch to main in MNELAB, everything is fine (also locally).

@cbrnr
Copy link
Contributor

cbrnr commented Jan 23, 2021

Done - see https://mne.discourse.group/t/we-have-renamed-the-main-development-branch-on-github-to-main/2526!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants