Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-19 02:44:31 +0300
committerJunio C Hamano <gitster@pobox.com>2020-11-20 02:44:18 +0300
commit3275f4e886b124b832b8b822c48e3e07b5b143ed (patch)
tree8c74af5ca53a141f7cffbf2e68773911f27d1a77 /t/t5509-fetch-push-namespaces.sh
parente4010de9f085e14de47d15c02b3f4f2cc5008877 (diff)
t550*: adjust the references to the default branch name "main"
This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -- t550*.sh) This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5509-fetch-push-namespaces.sh')
-rwxr-xr-xt/t5509-fetch-push-namespaces.sh32
1 files changed, 16 insertions, 16 deletions
diff --git a/t/t5509-fetch-push-namespaces.sh b/t/t5509-fetch-push-namespaces.sh
index f234dba91a..31553b48df 100755
--- a/t/t5509-fetch-push-namespaces.sh
+++ b/t/t5509-fetch-push-namespaces.sh
@@ -1,7 +1,7 @@
#!/bin/sh
test_description='fetch/push involving ref namespaces'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
@@ -30,9 +30,9 @@ test_expect_success setup '
test_expect_success 'pushing into a repository using a ref namespace' '
(
cd original &&
- git push pushee-namespaced master &&
+ git push pushee-namespaced main &&
git ls-remote pushee-namespaced >actual &&
- printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit1\trefs/heads/main\n" >expected &&
test_cmp expected actual &&
git push pushee-namespaced --tags &&
git ls-remote pushee-namespaced >actual &&
@@ -59,7 +59,7 @@ test_expect_success 'pulling from a repository using a ref namespace' '
cd puller &&
git remote add -f pushee-namespaced "ext::git --namespace=namespace %s ../pushee" &&
git for-each-ref refs/ >actual &&
- printf "$commit1 commit\trefs/remotes/pushee-namespaced/master\n" >expected &&
+ printf "$commit1 commit\trefs/remotes/pushee-namespaced/main\n" >expected &&
printf "$commit0 commit\trefs/tags/0\n" >>expected &&
printf "$commit1 commit\trefs/tags/1\n" >>expected &&
test_cmp expected actual
@@ -79,7 +79,7 @@ test_expect_success 'mirroring a repository using a ref namespace' '
(
cd mirror &&
git for-each-ref refs/ >actual &&
- printf "$commit1 commit\trefs/namespaces/namespace/refs/heads/master\n" >expected &&
+ printf "$commit1 commit\trefs/namespaces/namespace/refs/heads/main\n" >expected &&
printf "$commit0 commit\trefs/namespaces/namespace/refs/tags/0\n" >>expected &&
printf "$commit1 commit\trefs/namespaces/namespace/refs/tags/1\n" >>expected &&
test_cmp expected actual
@@ -90,7 +90,7 @@ test_expect_success 'hide namespaced refs with transfer.hideRefs' '
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs=refs/tags \
ls-remote "ext::git %s ." >actual &&
- printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit1\trefs/heads/main\n" >expected &&
test_cmp expected actual
'
@@ -98,7 +98,7 @@ test_expect_success 'check that transfer.hideRefs does not match unstripped refs
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs=refs/namespaces/namespace/refs/tags \
ls-remote "ext::git %s ." >actual &&
- printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit1\trefs/heads/main\n" >expected &&
printf "$commit0\trefs/tags/0\n" >>expected &&
printf "$commit1\trefs/tags/1\n" >>expected &&
test_cmp expected actual
@@ -108,23 +108,23 @@ test_expect_success 'hide full refs with transfer.hideRefs' '
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs="^refs/namespaces/namespace/refs/tags" \
ls-remote "ext::git %s ." >actual &&
- printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit1\trefs/heads/main\n" >expected &&
test_cmp expected actual
'
test_expect_success 'try to update a hidden ref' '
- test_config -C pushee transfer.hideRefs refs/heads/master &&
- test_must_fail git -C original push pushee-namespaced master
+ test_config -C pushee transfer.hideRefs refs/heads/main &&
+ test_must_fail git -C original push pushee-namespaced main
'
test_expect_success 'try to update a ref that is not hidden' '
- test_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/master &&
- git -C original push pushee-namespaced master
+ test_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/main &&
+ git -C original push pushee-namespaced main
'
test_expect_success 'try to update a hidden full ref' '
- test_config -C pushee transfer.hideRefs "^refs/namespaces/namespace/refs/heads/master" &&
- test_must_fail git -C original push pushee-namespaced master
+ test_config -C pushee transfer.hideRefs "^refs/namespaces/namespace/refs/heads/main" &&
+ test_must_fail git -C original push pushee-namespaced main
'
test_expect_success 'set up ambiguous HEAD' '
@@ -160,9 +160,9 @@ test_expect_success 'denyCurrentBranch and unborn branch with ref namespace' '
cd original &&
git init unborn &&
git remote add unborn-namespaced "ext::git --namespace=namespace %s unborn" &&
- test_must_fail git push unborn-namespaced HEAD:master &&
+ test_must_fail git push unborn-namespaced HEAD:main &&
git -C unborn config receive.denyCurrentBranch updateInstead &&
- git push unborn-namespaced HEAD:master
+ git push unborn-namespaced HEAD:main
)
'