Subject: Re: [PATCH 28/28] Change the default branch name to `main`

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Fri, 13 Nov 2020 10:57:51 +0100

On Thu, Nov 12 2020, Don Goodman-Wilson via GitGitGadget wrote:

> 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.

> 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.