]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5504-fetch-receive-strict.sh
t550*: adjust the references to the default branch name "main"
[thirdparty/git.git] / t / t5504-fetch-receive-strict.sh
index 7fe21b176d1814a9c72b292d7ffdb68cef565586..6e5a9c20e7fc036ef9fb5994931dba7b5cc9ef0f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 test_description='fetch/receive strict mode'
-GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
 . ./test-lib.sh
@@ -28,7 +28,7 @@ test_expect_success 'fetch without strict' '
                cd dst &&
                git config fetch.fsckobjects false &&
                git config transfer.fsckobjects false &&
-               test_must_fail git fetch ../.git master
+               test_must_fail git fetch ../.git main
        )
 '
 
@@ -39,7 +39,7 @@ test_expect_success 'fetch with !fetch.fsckobjects' '
                cd dst &&
                git config fetch.fsckobjects false &&
                git config transfer.fsckobjects true &&
-               test_must_fail git fetch ../.git master
+               test_must_fail git fetch ../.git main
        )
 '
 
@@ -50,7 +50,7 @@ test_expect_success 'fetch with fetch.fsckobjects' '
                cd dst &&
                git config fetch.fsckobjects true &&
                git config transfer.fsckobjects false &&
-               test_must_fail git fetch ../.git master
+               test_must_fail git fetch ../.git main
        )
 '
 
@@ -60,13 +60,13 @@ test_expect_success 'fetch with transfer.fsckobjects' '
        (
                cd dst &&
                git config transfer.fsckobjects true &&
-               test_must_fail git fetch ../.git master
+               test_must_fail git fetch ../.git main
        )
 '
 
 cat >exp <<EOF
 To dst
-!      refs/heads/master:refs/heads/test       [remote rejected] (missing necessary objects)
+!      refs/heads/main:refs/heads/test [remote rejected] (missing necessary objects)
 Done
 EOF
 
@@ -78,7 +78,7 @@ test_expect_success 'push without strict' '
                git config fetch.fsckobjects false &&
                git config transfer.fsckobjects false
        ) &&
-       test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+       test_must_fail git push --porcelain dst main:refs/heads/test >act &&
        test_cmp exp act
 '
 
@@ -90,13 +90,13 @@ test_expect_success 'push with !receive.fsckobjects' '
                git config receive.fsckobjects false &&
                git config transfer.fsckobjects true
        ) &&
-       test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+       test_must_fail git push --porcelain dst main:refs/heads/test >act &&
        test_cmp exp act
 '
 
 cat >exp <<EOF
 To dst
-!      refs/heads/master:refs/heads/test       [remote rejected] (unpacker error)
+!      refs/heads/main:refs/heads/test [remote rejected] (unpacker error)
 EOF
 
 test_expect_success 'push with receive.fsckobjects' '
@@ -107,7 +107,7 @@ test_expect_success 'push with receive.fsckobjects' '
                git config receive.fsckobjects true &&
                git config transfer.fsckobjects false
        ) &&
-       test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+       test_must_fail git push --porcelain dst main:refs/heads/test >act &&
        test_cmp exp act
 '
 
@@ -118,7 +118,7 @@ test_expect_success 'push with transfer.fsckobjects' '
                cd dst &&
                git config transfer.fsckobjects true
        ) &&
-       test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+       test_must_fail git push --porcelain dst main:refs/heads/test >act &&
        test_cmp exp act
 '