@@ -127,7 +127,7 @@ within a single branch, but this means the tuple `(num, branch-name)` uniquely
127
127
identifies a commit.
128
128
129
129
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
131
131
the objections raised above with respect to this aspect of Git.
132
132
133
133
What About Branches and Merges?
@@ -322,7 +322,7 @@ Currently
322
322
git clone https://llvm.org/git/llvm.git
323
323
cd llvm
324
324
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
326
326
git svn rebase -l # -l avoids fetching ahead of the git mirror.
327
327
328
328
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.
362
362
You can check whether the changes in the last fetch are relevant to your commit
363
363
by running::
364
364
365
- git log origin/master @{1}..origin/master -- libcxx
365
+ git log origin/main @{1}..origin/main -- libcxx
366
366
367
367
This command can be hidden in a script so that `git llvmpush ` would perform all
368
368
these steps, fail only if such a dependent change exists, and show immediately
@@ -392,21 +392,21 @@ Or using git-svn::
392
392
git clone https://llvm.org/git/llvm.git
393
393
cd llvm/
394
394
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
396
396
git svn rebase -l
397
397
git checkout `git svn find-rev -B r258109`
398
398
cd tools
399
399
git clone https://llvm.org/git/clang.git
400
400
cd clang/
401
401
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
403
403
git svn rebase -l
404
404
git checkout `git svn find-rev -B r258109`
405
405
cd ../../projects/
406
406
git clone https://llvm.org/git/libcxx.git
407
407
cd libcxx
408
408
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
410
410
git svn rebase -l
411
411
git checkout `git svn find-rev -B r258109`
412
412
@@ -604,13 +604,13 @@ Python script and are expanded on below to a more general recipe::
604
604
605
605
# Octopus-merge the resulting local split histories to unify them.
606
606
607
- # Assumes local work on local split mirrors is on master (and
607
+ # Assumes local work on local split mirrors is on main (and
608
608
# 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 "
611
611
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 \
614
614
refs/remotes/local/split/llvm/${my_local_branch})
615
615
git -C my-monorepo checkout local/octopus/${my_local_branch}
616
616
@@ -640,11 +640,11 @@ Python script and are expanded on below to a more general recipe::
640
640
641
641
The above gets you to a state like the following::
642
642
643
- U1 - U2 - U3 <- upstream/master
643
+ U1 - U2 - U3 <- upstream/main
644
644
\ \ \
645
645
\ \ - Llld1 - Llld2 -
646
646
\ \ \
647
- \ - Lclang1 - Lclang2-- Lmerge <- local/octopus/master
647
+ \ - Lclang1 - Lclang2-- Lmerge <- local/octopus/main
648
648
\ /
649
649
- Lllvm1 - Lllvm2-----
650
650
@@ -672,7 +672,7 @@ with some kind of "umbrella" project that imports the project git
672
672
mirrors as submodules, similar to the multirepo umbrella proposed
673
673
above. Such an umbrella repository looks something like this::
674
674
675
- UM1 ---- UM2 -- UM3 -- UM4 ---- UM5 ---- UM6 ---- UM7 ---- UM8 <- master
675
+ UM1 ---- UM2 -- UM3 -- UM4 ---- UM5 ---- UM6 ---- UM7 ---- UM8 <- main
676
676
| | | | | | |
677
677
Lllvm1 Llld1 Lclang1 Lclang2 Lllvm2 Llld2 Lmyproj1
678
678
@@ -687,14 +687,14 @@ https://github.com/greened/llvm-git-migration/tree/zip can be used to
687
687
convert the umbrella history into a monorepo-based history with
688
688
commits in the order implied by submodule updates::
689
689
690
- U1 - U2 - U3 <- upstream/master
690
+ U1 - U2 - U3 <- upstream/main
691
691
\ \ \
692
692
\ -----\--------------- local/zip--.
693
693
\ \ \ |
694
694
- Lllvm1 - Llld1 - UM3 - Lclang1 - Lclang2 - Lllvm2 - Llld2 - Lmyproj1 <-'
695
695
696
696
697
- The ``U* `` commits represent upstream commits to the monorepo master
697
+ The ``U* `` commits represent upstream commits to the monorepo main
698
698
branch. Each submodule update in the local ``UM* `` commits brought in
699
699
a subproject tree at some local commit. The trees in the ``L*1 ``
700
700
commits represent merges from upstream. These result in edges from
@@ -790,8 +790,8 @@ create the zipped history is below::
790
790
--update-tags
791
791
)
792
792
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
795
795
796
796
Note that if the umbrella has submodules to non-LLVM repositories,
797
797
``zip-downstream-fork.py `` needs to know about them to be able to
@@ -906,8 +906,8 @@ content into ``llvm`` in the zippped history::
906
906
--update-tags
907
907
)
908
908
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
911
911
912
912
913
913
Comments at the top of ``zip-downstream-fork.py `` describe in more
@@ -952,12 +952,12 @@ getting them into the monorepo. A recipe follows::
952
952
git -C my-monorepo branch --no-track myrepo/${branch} ${ref}
953
953
done
954
954
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
957
957
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
961
961
962
962
You may want to merge other corresponding branches, for example
963
963
``myrepo `` release branches if they were in lockstep with LLVM project
@@ -974,14 +974,14 @@ imported repositories.
974
974
975
975
Given this repository history::
976
976
977
- R1 - R2 - R3 <- master
977
+ R1 - R2 - R3 <- main
978
978
^
979
979
|
980
980
release/1
981
981
982
982
The above recipe results in a history like this::
983
983
984
- U1 - U2 - U3 <- upstream/master
984
+ U1 - U2 - U3 <- upstream/main
985
985
\ \ \
986
986
\ -----\--------------- local/zip--.
987
987
\ \ \ |
@@ -992,7 +992,7 @@ The above recipe results in a history like this::
992
992
| |
993
993
myrepo-release/1 |
994
994
|
995
- myrepo/master --'
995
+ myrepo/main --'
996
996
997
997
Commits ``R1 ``, ``R2 `` and ``R3 `` have trees that *only * contain blobs
998
998
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
1022
1022
of cruft around and we want to shrink our new monorepo mirror as much
1023
1023
as possible. Here is one way to do it::
1024
1024
1025
- git -C my-monorepo checkout master
1025
+ git -C my-monorepo checkout main
1026
1026
1027
1027
# Delete branches we no longer need. Do this for any other branches
1028
1028
# 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
1031
1031
1032
1032
# Remove remotes.
1033
1033
git -C my-monorepo remote remove upstream/monorepo
0 commit comments