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]

 



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.

Is there some meaning to the name "nain" and "naster" that I'm missing?
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