Skip to content

Commit 9668e19

Browse files
Quinn PhamQuinn Pham
authored andcommitted
[docs] Inclusive language: replace master with main
[NFC] As part of using inclusive language within the llvm project and be consistent with the renamed branch, replace master with main. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D112746
1 parent d0ec4a8 commit 9668e19

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

llvm/docs/Proposals/GitHubMove.rst

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ within a single branch, but this means the tuple `(num, branch-name)` uniquely
127127
identifies a commit.
128128

129129
We can thus use this revision number to ensure that e.g. `clang -v` reports a
130-
user-friendly revision number (e.g. `master-12345` or `4.0-5321`), addressing
130+
user-friendly revision number (e.g. `main-12345` or `4.0-5321`), addressing
131131
the objections raised above with respect to this aspect of Git.
132132

133133
What About Branches and Merges?
@@ -322,7 +322,7 @@ Currently
322322
git clone https://llvm.org/git/llvm.git
323323
cd llvm
324324
git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=<username>
325-
git config svn-remote.svn.fetch :refs/remotes/origin/master
325+
git config svn-remote.svn.fetch :refs/remotes/origin/main
326326
git svn rebase -l # -l avoids fetching ahead of the git mirror.
327327

328328
Commits are performed using `svn commit` or with the sequence `git commit` and
@@ -362,7 +362,7 @@ won't appear on your disk. The only effect is that your commit hash changes.
362362
You can check whether the changes in the last fetch are relevant to your commit
363363
by running::
364364

365-
git log origin/master@{1}..origin/master -- libcxx
365+
git log origin/main@{1}..origin/main -- libcxx
366366

367367
This command can be hidden in a script so that `git llvmpush` would perform all
368368
these steps, fail only if such a dependent change exists, and show immediately
@@ -392,21 +392,21 @@ Or using git-svn::
392392
git clone https://llvm.org/git/llvm.git
393393
cd llvm/
394394
git svn init https://llvm.org/svn/llvm-project/llvm/trunk --username=<username>
395-
git config svn-remote.svn.fetch :refs/remotes/origin/master
395+
git config svn-remote.svn.fetch :refs/remotes/origin/main
396396
git svn rebase -l
397397
git checkout `git svn find-rev -B r258109`
398398
cd tools
399399
git clone https://llvm.org/git/clang.git
400400
cd clang/
401401
git svn init https://llvm.org/svn/llvm-project/clang/trunk --username=<username>
402-
git config svn-remote.svn.fetch :refs/remotes/origin/master
402+
git config svn-remote.svn.fetch :refs/remotes/origin/main
403403
git svn rebase -l
404404
git checkout `git svn find-rev -B r258109`
405405
cd ../../projects/
406406
git clone https://llvm.org/git/libcxx.git
407407
cd libcxx
408408
git svn init https://llvm.org/svn/llvm-project/libcxx/trunk --username=<username>
409-
git config svn-remote.svn.fetch :refs/remotes/origin/master
409+
git config svn-remote.svn.fetch :refs/remotes/origin/main
410410
git svn rebase -l
411411
git checkout `git svn find-rev -B r258109`
412412

@@ -604,13 +604,13 @@ Python script and are expanded on below to a more general recipe::
604604

605605
# Octopus-merge the resulting local split histories to unify them.
606606

607-
# Assumes local work on local split mirrors is on master (and
607+
# Assumes local work on local split mirrors is on main (and
608608
# upstream is presumably represented by some other branch like
609-
# upstream/master).
610-
my_local_branch="master"
609+
# upstream/main).
610+
my_local_branch="main"
611611

612-
git -C my-monorepo branch --no-track local/octopus/master \
613-
$(git -C my-monorepo merge-base refs/remotes/upstream/monorepo/master \
612+
git -C my-monorepo branch --no-track local/octopus/main \
613+
$(git -C my-monorepo merge-base refs/remotes/upstream/monorepo/main \
614614
refs/remotes/local/split/llvm/${my_local_branch})
615615
git -C my-monorepo checkout local/octopus/${my_local_branch}
616616

@@ -640,11 +640,11 @@ Python script and are expanded on below to a more general recipe::
640640

641641
The above gets you to a state like the following::
642642

643-
U1 - U2 - U3 <- upstream/master
643+
U1 - U2 - U3 <- upstream/main
644644
\ \ \
645645
\ \ - Llld1 - Llld2 -
646646
\ \ \
647-
\ - Lclang1 - Lclang2-- Lmerge <- local/octopus/master
647+
\ - Lclang1 - Lclang2-- Lmerge <- local/octopus/main
648648
\ /
649649
- Lllvm1 - Lllvm2-----
650650

@@ -672,7 +672,7 @@ with some kind of "umbrella" project that imports the project git
672672
mirrors as submodules, similar to the multirepo umbrella proposed
673673
above. Such an umbrella repository looks something like this::
674674

675-
UM1 ---- UM2 -- UM3 -- UM4 ---- UM5 ---- UM6 ---- UM7 ---- UM8 <- master
675+
UM1 ---- UM2 -- UM3 -- UM4 ---- UM5 ---- UM6 ---- UM7 ---- UM8 <- main
676676
| | | | | | |
677677
Lllvm1 Llld1 Lclang1 Lclang2 Lllvm2 Llld2 Lmyproj1
678678

@@ -687,14 +687,14 @@ https://github.com/greened/llvm-git-migration/tree/zip can be used to
687687
convert the umbrella history into a monorepo-based history with
688688
commits in the order implied by submodule updates::
689689

690-
U1 - U2 - U3 <- upstream/master
690+
U1 - U2 - U3 <- upstream/main
691691
\ \ \
692692
\ -----\--------------- local/zip--.
693693
\ \ \ |
694694
- Lllvm1 - Llld1 - UM3 - Lclang1 - Lclang2 - Lllvm2 - Llld2 - Lmyproj1 <-'
695695

696696

697-
The ``U*`` commits represent upstream commits to the monorepo master
697+
The ``U*`` commits represent upstream commits to the monorepo main
698698
branch. Each submodule update in the local ``UM*`` commits brought in
699699
a subproject tree at some local commit. The trees in the ``L*1``
700700
commits represent merges from upstream. These result in edges from
@@ -790,8 +790,8 @@ create the zipped history is below::
790790
--update-tags
791791
)
792792

793-
# Create the zip branch (assuming umbrella master is wanted).
794-
git -C my-monorepo branch --no-track local/zip/master refs/remotes/umbrella/master
793+
# Create the zip branch (assuming umbrella main is wanted).
794+
git -C my-monorepo branch --no-track local/zip/main refs/remotes/umbrella/main
795795

796796
Note that if the umbrella has submodules to non-LLVM repositories,
797797
``zip-downstream-fork.py`` needs to know about them to be able to
@@ -906,8 +906,8 @@ content into ``llvm`` in the zippped history::
906906
--update-tags
907907
)
908908

909-
# Create the zip branch (assuming umbrella master is wanted).
910-
git -C my-monorepo branch --no-track local/zip/master refs/remotes/umbrella/master
909+
# Create the zip branch (assuming umbrella main is wanted).
910+
git -C my-monorepo branch --no-track local/zip/main refs/remotes/umbrella/main
911911

912912

913913
Comments at the top of ``zip-downstream-fork.py`` describe in more
@@ -952,12 +952,12 @@ getting them into the monorepo. A recipe follows::
952952
git -C my-monorepo branch --no-track myrepo/${branch} ${ref}
953953
done
954954

955-
# Preserve master.
956-
git -C my-monorepo branch --no-track myrepo/master refs/remotes/myrepo/master
955+
# Preserve main.
956+
git -C my-monorepo branch --no-track myrepo/main refs/remotes/myrepo/main
957957

958-
# Merge master.
959-
git -C my-monorepo checkout local/zip/master # Or local/octopus/master
960-
git -C my-monorepo merge myrepo/master
958+
# Merge main.
959+
git -C my-monorepo checkout local/zip/main # Or local/octopus/main
960+
git -C my-monorepo merge myrepo/main
961961

962962
You may want to merge other corresponding branches, for example
963963
``myrepo`` release branches if they were in lockstep with LLVM project
@@ -974,14 +974,14 @@ imported repositories.
974974

975975
Given this repository history::
976976

977-
R1 - R2 - R3 <- master
977+
R1 - R2 - R3 <- main
978978
^
979979
|
980980
release/1
981981

982982
The above recipe results in a history like this::
983983

984-
U1 - U2 - U3 <- upstream/master
984+
U1 - U2 - U3 <- upstream/main
985985
\ \ \
986986
\ -----\--------------- local/zip--.
987987
\ \ \ |
@@ -992,7 +992,7 @@ The above recipe results in a history like this::
992992
| |
993993
myrepo-release/1 |
994994
|
995-
myrepo/master--'
995+
myrepo/main--'
996996

997997
Commits ``R1``, ``R2`` and ``R3`` have trees that *only* contain blobs
998998
from ``myrepo``. If you require commits from ``myrepo`` to be
@@ -1022,12 +1022,12 @@ clean up. The python tools use ``git-fast-import`` which leaves a lot
10221022
of cruft around and we want to shrink our new monorepo mirror as much
10231023
as possible. Here is one way to do it::
10241024

1025-
git -C my-monorepo checkout master
1025+
git -C my-monorepo checkout main
10261026

10271027
# Delete branches we no longer need. Do this for any other branches
10281028
# you merged above.
1029-
git -C my-monorepo branch -D local/zip/master || true
1030-
git -C my-monorepo branch -D local/octopus/master || true
1029+
git -C my-monorepo branch -D local/zip/main || true
1030+
git -C my-monorepo branch -D local/octopus/main || true
10311031

10321032
# Remove remotes.
10331033
git -C my-monorepo remote remove upstream/monorepo

0 commit comments

Comments
 (0)