submodule update: silence underlying fetch with "--quiet"

Commands such as

    $ git submodule update --quiet --init --depth=1

involving shallow clones, call the shell function fetch_in_submodule, which
in turn invokes git fetch.  Pass the --quiet option onward there.

Signed-off-by: Nicholas Clark <nick@ccl4.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nicholas Clark
2021-04-30 09:59:06 +00:00
committed by Junio C Hamano
parent 48bf2fa8ba
commit 62af4bdd42
2 changed files with 26 additions and 2 deletions

View File

@ -420,9 +420,9 @@ fetch_in_submodule () (
cd "$1" &&
if test $# -eq 3
then
echo "$3" | git fetch --stdin ${2:+"$2"}
echo "$3" | git fetch ${GIT_QUIET:+--quiet} --stdin ${2:+"$2"}
else
git fetch ${2:+"$2"}
git fetch ${GIT_QUIET:+--quiet} ${2:+"$2"}
fi
)