summaryrefslogtreecommitdiff
path: root/t/t5526-fetch-submodules.sh
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2015-12-16 00:04:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-12-16 20:06:08 (GMT)
commit62104ba14af4845c6c1ba1dab05fad4a289d806f (patch)
treecb6c41e411e48b33bb12f85eb1e6f1497e73d63a /t/t5526-fetch-submodules.sh
parentfe85ee6e23e642985004d37e63b4c0d0e5f30587 (diff)
downloadgit-62104ba14af4845c6c1ba1dab05fad4a289d806f.zip
git-62104ba14af4845c6c1ba1dab05fad4a289d806f.tar.gz
git-62104ba14af4845c6c1ba1dab05fad4a289d806f.tar.bz2
submodules: allow parallel fetching, add tests and documentation
This enables the work of the previous patches. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5526-fetch-submodules.sh')
-rwxr-xr-xt/t5526-fetch-submodules.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh
index 17759b1..1241146 100755
--- a/t/t5526-fetch-submodules.sh
+++ b/t/t5526-fetch-submodules.sh
@@ -71,6 +71,17 @@ test_expect_success "fetch --recurse-submodules recurses into submodules" '
test_i18ncmp expect.err actual.err
'
+test_expect_success "fetch --recurse-submodules -j2 has the same output behaviour" '
+ add_upstream_commit &&
+ (
+ cd downstream &&
+ GIT_TRACE=$(pwd)/../trace.out git fetch --recurse-submodules -j2 2>../actual.err
+ ) &&
+ test_must_be_empty actual.out &&
+ test_i18ncmp expect.err actual.err &&
+ grep "2 tasks" trace.out
+'
+
test_expect_success "fetch alone only fetches superproject" '
add_upstream_commit &&
(
@@ -140,6 +151,15 @@ test_expect_success "--quiet propagates to submodules" '
! test -s actual.err
'
+test_expect_success "--quiet propagates to parallel submodules" '
+ (
+ cd downstream &&
+ git fetch --recurse-submodules -j 2 --quiet >../actual.out 2>../actual.err
+ ) &&
+ ! test -s actual.out &&
+ ! test -s actual.err
+'
+
test_expect_success "--dry-run propagates to submodules" '
add_upstream_commit &&
(