Re: [PATCH 28/28] Change the default branch name to `main`
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 13, 2020, 09:57 UTC
- Message-ID
- <87v9e9fujk.fsf@evledraar.gmail.com>
- In-Reply-To
- <f853fa946f5840518577584a5b8c51660da06928.1605221040.git.gitgitgadget@gmail.com>
On Thu, Nov 12 2020, Don Goodman-Wilson via GitGitGadget wrote:
Show 5 quoted lines
> The current default name for the initial branch is a loaded term, and > many Open Source projects renamed their principal branches already. A > common choice appears to be `main`. > > Let's follow their lead and change the default of `init.defaultBranch`.
I think it makes sense to split this change off from a 28-series test cleanup series.
Show 10 quoted lines
> diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
> index bd3fa3c6da..1b0abcb0f8 100644
> --- a/t/lib-submodule-update.sh
> +++ b/t/lib-submodule-update.sh
> @@ -144,7 +144,7 @@ create_lib_submodule_repo () {
> git checkout -b valid_sub1 &&
> git revert HEAD &&
>
> - git checkout "${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-master}"
> + git checkout "${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-main}"Earlier in that function we're doing a "git init". With all this test cleanup I wonder why not just "git rev-parse --abbrev-ref" to get the default name, instead of carrying the hardcoding forward.