summaryrefslogtreecommitdiff
path: root/t/t5614-clone-submodules.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-06 20:38:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-06 20:38:13 (GMT)
commit9f1027d18a23e7c2ae60d3fb0a943e7b3342c532 (patch)
tree0a21a9f5e2868c06264cf2f979783a814dc0f00b /t/t5614-clone-submodules.sh
parented0f7bdec93478e280c9faa2a8ffb13a183cda09 (diff)
parent18a74a092bff41f1ffe10bd2463d3eed9a04435d (diff)
downloadgit-9f1027d18a23e7c2ae60d3fb0a943e7b3342c532.zip
git-9f1027d18a23e7c2ae60d3fb0a943e7b3342c532.tar.gz
git-9f1027d18a23e7c2ae60d3fb0a943e7b3342c532.tar.bz2
Merge branch 'sb/clone-shallow-passthru'
Fix an unintended regression in v2.9 that breaks "clone --depth" that recurses down to submodules by forcing the submodules to also be cloned shallowly, which many server instances that host upstream of the submodules are not prepared for. * sb/clone-shallow-passthru: clone: do not let --depth imply --shallow-submodules
Diffstat (limited to 't/t5614-clone-submodules.sh')
-rwxr-xr-xt/t5614-clone-submodules.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/t/t5614-clone-submodules.sh b/t/t5614-clone-submodules.sh
index 32d83e2..ea78f1f 100755
--- a/t/t5614-clone-submodules.sh
+++ b/t/t5614-clone-submodules.sh
@@ -37,9 +37,9 @@ test_expect_success 'nonshallow clone implies nonshallow submodule' '
)
'
-test_expect_success 'shallow clone implies shallow submodule' '
+test_expect_success 'shallow clone with shallow submodule' '
test_when_finished "rm -rf super_clone" &&
- git clone --recurse-submodules --depth 2 "file://$pwd/." super_clone &&
+ git clone --recurse-submodules --depth 2 --shallow-submodules "file://$pwd/." super_clone &&
(
cd super_clone &&
git log --oneline >lines &&
@@ -52,6 +52,21 @@ test_expect_success 'shallow clone implies shallow submodule' '
)
'
+test_expect_success 'shallow clone does not imply shallow submodule' '
+ test_when_finished "rm -rf super_clone" &&
+ git clone --recurse-submodules --depth 2 "file://$pwd/." super_clone &&
+ (
+ cd super_clone &&
+ git log --oneline >lines &&
+ test_line_count = 2 lines
+ ) &&
+ (
+ cd super_clone/sub &&
+ git log --oneline >lines &&
+ test_line_count = 3 lines
+ )
+'
+
test_expect_success 'shallow clone with non shallow submodule' '
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules --depth 2 --no-shallow-submodules "file://$pwd/." super_clone &&