summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTheodore Dubois <tbodt@google.com>2020-09-30 19:50:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-01 15:50:24 (GMT)
commit3ad0401e9e6d3e243a21a3f376e36453572dcf0d (patch)
tree0b03cdecf73c881cd7e53d2068b6de9f4b158981 /t
parent47ae905ffb98cc4d4fd90083da6bc8dab55d9ecc (diff)
downloadgit-3ad0401e9e6d3e243a21a3f376e36453572dcf0d.zip
git-3ad0401e9e6d3e243a21a3f376e36453572dcf0d.tar.gz
git-3ad0401e9e6d3e243a21a3f376e36453572dcf0d.tar.bz2
submodule update: silence underlying merge/rebase with "--quiet"
Commands such as $ git pull --rebase --recurse-submodules --quiet produce non-quiet output from the merge or rebase. Pass the --quiet option down when invoking "rebase" and "merge". Also fix the parsing of git submodule update -v. When e84c3cf3 (git-submodule.sh: accept verbose flag in cmd_update to be non-quiet, 2018-08-14) taught "git submodule update" to take "--quiet", it apparently did not know how ${GIT_QUIET:+--quiet} works, and reviewers seem to have missed that setting the variable to "0", rather than unsetting it, still results in "--quiet" being passed to underlying commands. Signed-off-by: Theodore Dubois <tbodt@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7406-submodule-update.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index aa19ff3..acb8766 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -1022,4 +1022,16 @@ test_expect_success 'git clone passes the parallel jobs config on to submodules'
rm -rf super4
'
+test_expect_success 'submodule update --quiet passes quietness to merge/rebase' '
+ (cd super &&
+ test_commit -C rebasing message &&
+ git submodule update --rebase --quiet >out 2>err &&
+ test_must_be_empty out &&
+ test_must_be_empty err &&
+ git submodule update --rebase -v >out 2>err &&
+ test_file_not_empty out &&
+ test_must_be_empty err
+ )
+'
+
test_done