Re: [PATCH 14/28] t55[23]*: adjust the references to the default branch name "main"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ævar,

On Fri, 13 Nov 2020, Ævar Arnfjörð Bjarmason wrote:

>
> On Thu, Nov 12 2020, Johannes Schindelin via GitGitGadget wrote:
>
> > From: Johannes Schindelin <johannes.schindelin@xxxxxx>
> >
> > This trick was performed via
> >
> > 	$ (cd t &&
> > 	   sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
> > 		-e 's/Master/Main/g' -e 's/naster/nain/g' -- t55[23]*.sh)
> >
> > Note that t5533 contains a variation of the name `master` (`naster`)
> > that we rename here, too.
> >
> > This commit allows us to define
> > `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for that range of tests.
>
> There's also a "naster" in t/t1402-check-ref-format.sh that's not
> changed here and missed by 02/28 of this series.

Whoops, you're right. It's not even new: 7c3f847aad7 (check-ref-format
--branch: do not expand @{...} outside repository, 2017-10-17) introduced
it. I missed that one, thank you for pointing it out.

I will follow up with a separate patch to fix that, once the dust settles
on this here patch series.

> Is there some meaning to the name "nain" and "naster" that I'm missing?

I guess the original reasoning was to stay close to the original default
branch name. I'm not sure whether it is worth changing that idea. Like, if
you ask me whether it hurts to use "nain"? I looked up possible
connotations, and the most common one was "grandmother", and that's rather
endearing to me.

Ciao,
Dscho

> If not can we just call this "topic" or something while we're at it?
> I.e. this on top (just s/nain/topic/g):
>
> diff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh
> index 9fcec604c3..4e33ec1fb9 100755
> --- a/t/t5533-push-cas.sh
> +++ b/t/t5533-push-cas.sh
> @@ -201,12 +201,12 @@ test_expect_success 'cover everything with default force-with-lease (protected)'
>  	setup_srcdst_basic &&
>  	(
>  		cd src &&
> -		git branch nain main^
> +		git branch topic main^
>  	) &&
>  	git ls-remote src refs/heads/\* >expect &&
>  	(
>  		cd dst &&
> -		test_must_fail git push --force-with-lease origin main main:nain
> +		test_must_fail git push --force-with-lease origin main main:topic
>  	) &&
>  	git ls-remote src refs/heads/\* >actual &&
>  	test_cmp expect actual
> @@ -216,16 +216,16 @@ test_expect_success 'cover everything with default force-with-lease (allowed)' '
>  	setup_srcdst_basic &&
>  	(
>  		cd src &&
> -		git branch nain main^
> +		git branch topic main^
>  	) &&
>  	(
>  		cd dst &&
>  		git fetch &&
> -		git push --force-with-lease origin main main:nain
> +		git push --force-with-lease origin main main:topic
>  	) &&
>  	git ls-remote dst refs/heads/main |
> -	sed -e "s/main/nain/" >expect &&
> -	git ls-remote src refs/heads/nain >actual &&
> +	sed -e "s/main/topic/" >expect &&
> +	git ls-remote src refs/heads/topic >actual &&
>  	test_cmp expect actual
>  '
>
>

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux