]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5617-clone-submodules-remote.sh
Sync with 2.30.6
[thirdparty/git.git] / t / t5617-clone-submodules-remote.sh
index 0152dc04400fffc513a8b01774abf2c5fed535ff..5691f27405c060293ea400b551e86dc21e7aee91 100755 (executable)
@@ -2,13 +2,16 @@
 
 test_description='Test cloning repos with submodules using remote-tracking branches'
 
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
 . ./test-lib.sh
 
 pwd=$(pwd)
 
 test_expect_success 'setup' '
        git config --global protocol.file.allow always &&
-       git checkout -b master &&
+       git checkout -b main &&
        test_commit commit1 &&
        mkdir sub &&
        (
@@ -40,7 +43,7 @@ test_expect_success 'clone with --remote-submodules' '
        git clone --recurse-submodules --remote-submodules "file://$pwd/." super_clone &&
        (
                cd super_clone/sub &&
-               git diff --exit-code remotes/origin/master
+               git diff --exit-code remotes/origin/main
        )
 '
 
@@ -58,7 +61,7 @@ test_expect_success 'clone with --single-branch' '
        git clone --recurse-submodules --single-branch "file://$pwd/." super_clone &&
        (
                cd super_clone/sub &&
-               git rev-parse --verify origin/master &&
+               git rev-parse --verify origin/main &&
                test_must_fail git rev-parse --verify origin/other
        )
 '