]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5617-clone-submodules-remote.sh
upload-pack: move allow_unadvertised_object_request to upload_pack_data
[thirdparty/git.git] / t / t5617-clone-submodules-remote.sh
index 37fcce9c40c98f55f76f01bf38ca575f7c246d09..1a041df10bee558bf4b643f42d4ffa876fefbc14 100755 (executable)
@@ -14,7 +14,8 @@ test_expect_success 'setup' '
                cd sub &&
                git init &&
                test_commit subcommit1 &&
-               git tag sub_when_added_to_super
+               git tag sub_when_added_to_super &&
+               git branch other
        ) &&
        git submodule add "file://$pwd/sub" sub &&
        git commit -m "add submodule" &&
@@ -51,4 +52,14 @@ test_expect_success 'check the default is --no-remote-submodules' '
        )
 '
 
+test_expect_success 'clone with --single-branch' '
+       test_when_finished "rm -rf super_clone" &&
+       git clone --recurse-submodules --single-branch "file://$pwd/." super_clone &&
+       (
+               cd super_clone/sub &&
+               git rev-parse --verify origin/master &&
+               test_must_fail git rev-parse --verify origin/other
+       )
+'
+
 test_done