diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-05 18:43:03 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-05 18:43:03 (GMT) |
commit | b22db265d6bde72391c8d47700dc781a3ea2ae41 (patch) | |
tree | e7cd2c479dac47579b08096130d1a8c63e04e19b /t | |
parent | e8e71848ea866d7dc34eacffc20b9c3826ae29a1 (diff) | |
parent | 132f600b060c2db7fd3d450dfadb6779a61c648a (diff) | |
download | git-b22db265d6bde72391c8d47700dc781a3ea2ae41.zip git-b22db265d6bde72391c8d47700dc781a3ea2ae41.tar.gz git-b22db265d6bde72391c8d47700dc781a3ea2ae41.tar.bz2 |
Merge branch 'es/recursive-single-branch-clone'
"git clone --recurse-submodules --single-branch" now uses the same
single-branch option when cloning the submodules.
* es/recursive-single-branch-clone:
clone: pass --single-branch during --recurse-submodules
submodule--helper: use C99 named initializer
Diffstat (limited to 't')
-rwxr-xr-x | t/t5617-clone-submodules-remote.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/t/t5617-clone-submodules-remote.sh b/t/t5617-clone-submodules-remote.sh index 37fcce9..1a041df 100755 --- a/t/t5617-clone-submodules-remote.sh +++ b/t/t5617-clone-submodules-remote.sh @@ -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 |