From 515b5884d075beac531c39148fc0a678dc795c4d Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Tue, 20 Oct 2026 16:29:52 +0200 Subject: [PATCH] =?UTF-8?q?master=20=E2=86=92=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default branch of the repository changed from `master` to `main`, so adapt scripts and documentation. --- CONTRIBUTING.md | 2 +- HACKING.md | 6 +++--- RELEASE.md | 10 +++++----- rad-id.1.adoc | 6 +++--- rad-patch.1.adoc | 10 +++++----- scripts/delete-remote-branches.sh | 4 ++-- scripts/git-hook-template.sh | 2 +- scripts/patch-rebase.sh | 6 +++--- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 730b28012..d8f4d9f25 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -285,7 +285,7 @@ When proposing changes via a patch: * Isolate changes in separate commits to make the review process easier. * Don't make unrelated changes, unless it happens to be an obvious improvement to code you are touching anyway ("boyscout rule"). -* Rebase on `master` when needed. +* Rebase on `main` when needed. * Keep your changesets small, specific and uncontroversial, so that they can be merged more quickly. * If the change is substantial or requires re-architecting certain parts of the diff --git a/HACKING.md b/HACKING.md index 7a4e09630..66c378f39 100644 --- a/HACKING.md +++ b/HACKING.md @@ -144,11 +144,11 @@ Once inside a repository folder, the following commands may come in handy. `git show-ref` to show all references: $ git show-ref - f60b291752bc38be7dfc90c4c4034de13e01a66b refs/heads/master - f60b291752bc38be7dfc90c4c4034de13e01a66b refs/namespaces/z6MkqTY5aQepDGNCrkPqzdmzveX3D4oAmyVXUDDVQaDGdyVH/refs/heads/master + f60b291752bc38be7dfc90c4c4034de13e01a66b refs/heads/main + f60b291752bc38be7dfc90c4c4034de13e01a66b refs/namespaces/z6MkqTY5aQepDGNCrkPqzdmzveX3D4oAmyVXUDDVQaDGdyVH/refs/heads/main 805b7d0df927dcbc4d3911ab07cd497953eecbd1 refs/namespaces/z6MkqTY5aQepDGNCrkPqzdmzveX3D4oAmyVXUDDVQaDGdyVH/refs/rad/id 86136a42a69572015466bac2d974154ee76f0853 refs/namespaces/z6MkqTY5aQepDGNCrkPqzdmzveX3D4oAmyVXUDDVQaDGdyVH/refs/rad/sigrefs - 5575035d8b4faf1f18c532b08516f18031dd7b28 refs/namespaces/z6MkuGSynjxM8SLhcsiEPWZgDeGLAVNXf5g7WePmc1Tri1FS/refs/heads/master + 5575035d8b4faf1f18c532b08516f18031dd7b28 refs/namespaces/z6MkuGSynjxM8SLhcsiEPWZgDeGLAVNXf5g7WePmc1Tri1FS/refs/heads/main 805b7d0df927dcbc4d3911ab07cd497953eecbd1 refs/namespaces/z6MkuGSynjxM8SLhcsiEPWZgDeGLAVNXf5g7WePmc1Tri1FS/refs/rad/id 89e4f0baa327595c7b2849189fc8808388a29033 refs/namespaces/z6MkuGSynjxM8SLhcsiEPWZgDeGLAVNXf5g7WePmc1Tri1FS/refs/rad/sigrefs diff --git a/RELEASE.md b/RELEASE.md index b56ac5815..770f7d04c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -14,7 +14,7 @@ The first action required is to create a release tag. All tags that start with a `releases/` are considered release tags, e.g. `releases/1.0.0`, `releases/1.1.0`, `releases/1.1.0-rc`, etc. Before creating the tag, we must decide which commit we are choosing for the -release. In general, this will be the latest commit of the `master` branch. We +release. In general, this will be the latest commit of the `main` branch. We checkout this commit: ``` @@ -211,7 +211,7 @@ missed notes. Once the change log is finalized with a header using the version number, e.g. `## 1.5.0`, it should be committed to the `releases/x.y` branch and a patch must -be made to port the changes to the `master` branch. +be made to port the changes to the `main` branch. ### Announcement @@ -231,16 +231,16 @@ release patch releases of the binaries. These patch releases must be compatible with minor version that was released; otherwise, the commits should not be included. -These changes may have been made on `master` and back-ported to the +These changes may have been made on `main` and back-ported to the `releases/x.y` branch. Note that is not the job of the maintainer to ensure that the change applies cleanly to both branches – it is the job of the person contributing the changes. Alternatively, it may be the case that changes are made on the `releases/x.y` -branch and forward-ported to `master`. The burden of ensuring changes apply +branch and forward-ported to `main`. The burden of ensuring changes apply remains the same as above. Remember that `heartwood/CHANGELOG.md` must be updated to include the latest -changes in the patch release. These must be forward-ported to the `master` +changes in the patch release. These must be forward-ported to the `main` branch. [radicle-infra]: https://radicle.network/nodes/seed.radicle.dev/rad:z254T5p17bdFPmzfDojsdjo4HjpoZ diff --git a/rad-id.1.adoc b/rad-id.1.adoc index 173d91e29..2a10a3f69 100644 --- a/rad-id.1.adoc +++ b/rad-id.1.adoc @@ -185,7 +185,7 @@ object as the value. Here is an example below: $ rad id update --title "Update canonical reference rules" \ --payload xyz.radicle.crefs rules '{ - "refs/heads/master": { "threshold": 1, "allow": "delegates" }, + "refs/heads/main": { "threshold": 1, "allow": "delegates" }, "refs/tags/*": { "threshold": 2, "allow": "delegates" }, "refs/tags/qa/*": { "threshold": 1, "allow": "delegates" } }' @@ -197,7 +197,7 @@ the payload directly. Here is an example of what that may look like: "payload": { "xyz.radicle.crefs": { "rules": { - "refs/heads/master": { + "refs/heads/main": { "allow": "delegates", "threshold": 1 }, @@ -212,7 +212,7 @@ the payload directly. Here is an example of what that may look like: } }, "xyz.radicle.project": { - "defaultBranch": "master", + "defaultBranch": "main", "description": "Radicle Heartwood Protocol & Stack", "name": "heartwood" } diff --git a/rad-patch.1.adoc b/rad-patch.1.adoc index 4f1246107..1bb2de783 100644 --- a/rad-patch.1.adoc +++ b/rad-patch.1.adoc @@ -229,7 +229,7 @@ The full list of options follows: *patch.base*=__:: The base commit onto which this patch should be merged. By default, this is - your "master" branch. When building stacked patches, it may be useful to + your "main" branch. When building stacked patches, it may be useful to set this to the head of a previous patch. For more information on push options, see *git-push(1)*. @@ -274,20 +274,20 @@ there, you can *git-push* to publish a patch update, or simply browse the code. == Merging a patch Once a patch is ready to merge, the repository maintainer simply has to use the -*git-merge(1)* command from the "master" branch and push via *git*. For +*git-merge(1)* command from the "main" branch and push via *git*. For example, if some patch *26e3e56* is ready to merge, the steps would be: $ rad patch checkout 26e3e56 ✓ Switched to branch patch/26e3e56 - $ git checkout master + $ git checkout main $ git merge patch/26e3e56 $ git push rad ✓ Patch 26e3e563ddc7df8dd0c9f81274c0b3cb1b764568 merged To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi - f2de534..d6399c7 master -> master + f2de534..d6399c7 main -> main In the above, we created a checkout for the patch, and merged that branch into -our master branch. Then we pushed to our *rad* remote. +our main branch. Then we pushed to our *rad* remote. == Listing patches diff --git a/scripts/delete-remote-branches.sh b/scripts/delete-remote-branches.sh index 6e12f9d3f..414e7f6e7 100755 --- a/scripts/delete-remote-branches.sh +++ b/scripts/delete-remote-branches.sh @@ -19,8 +19,8 @@ is_remote_branch() { for branch in $(git branch -r --format "%(refname:short)"); do # Extract the branch name without the "$remote/" prefix. branch=${branch#"$remote/"} - # Never delete the master branch. - if [ "$branch" = "master" ]; then + # Never delete the main branch. + if [ "$branch" = "main" ]; then continue fi diff --git a/scripts/git-hook-template.sh b/scripts/git-hook-template.sh index e6fc71bdc..8977dff37 100644 --- a/scripts/git-hook-template.sh +++ b/scripts/git-hook-template.sh @@ -10,7 +10,7 @@ then fi readonly SENSITIVE_FILES=("justfile" "build.rs" "rust-toolchain.toml") -readonly BASE_BRANCH="master" +readonly BASE_BRANCH="main" # Check which files were modified compared to the base branch. mapfile -t CHANGED_FILES < <(comm -12 \ diff --git a/scripts/patch-rebase.sh b/scripts/patch-rebase.sh index 8b0e4211f..3f68ee38c 100755 --- a/scripts/patch-rebase.sh +++ b/scripts/patch-rebase.sh @@ -7,6 +7,6 @@ if [ "$#" -lt 1 ]; then fi rad patch checkout "$1" -git rebase master --autosquash -rad patch update "$1" --message "Rebased on master" -git checkout master +git rebase main --autosquash +rad patch update "$1" --message "Rebased on main" +git checkout main