summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-05-11 15:27:22 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-05-11 15:27:22 +0900
commit74339f814c31ff7c4717fa401467d0f8c0ba70c1 (patch)
treef7865e79ebbcaf063eb7472e64ef47251c1caef1 /t
parentMerge branch 'js/merge-already-up-to-date-message-reword' (diff)
parentsubmodule update: silence underlying fetch with "--quiet" (diff)
downloadtgif-74339f814c31ff7c4717fa401467d0f8c0ba70c1.tar.xz
Merge branch 'nc/submodule-update-quiet'
"git submodule update --quiet" did not propagate the quiet option down to underlying "git fetch", which has been corrected. * nc/submodule-update-quiet: submodule update: silence underlying fetch with "--quiet"
Diffstat (limited to 't')
-rwxr-xr-xt/t7406-submodule-update.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index ff3ba5422e..f4f61fe554 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -1037,4 +1037,28 @@ test_expect_success 'submodule update --quiet passes quietness to merge/rebase'
)
'
+test_expect_success 'submodule update --quiet passes quietness to fetch with a shallow clone' '
+ test_when_finished "rm -rf super4 super5 super6" &&
+ git clone . super4 &&
+ (cd super4 &&
+ git submodule add --quiet file://"$TRASH_DIRECTORY"/submodule submodule3 &&
+ git commit -am "setup submodule3"
+ ) &&
+ (cd submodule &&
+ test_commit line6 file
+ ) &&
+ git clone super4 super5 &&
+ (cd super5 &&
+ git submodule update --quiet --init --depth=1 submodule3 >out 2>err &&
+ test_must_be_empty out &&
+ test_must_be_empty err
+ ) &&
+ git clone super4 super6 &&
+ (cd super6 &&
+ git submodule update --init --depth=1 submodule3 >out 2>err &&
+ test_file_not_empty out &&
+ test_file_not_empty err
+ )
+'
+
test_done