summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-04-30 09:59:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-03 03:24:38 (GMT)
commit62af4bdd423f5f3988dad97abcdd7adfba0756c4 (patch)
tree24afc8217158fa081400145d589d878be309c288 /git-submodule.sh
parent48bf2fa8bad054d66bd79c6ba903c89c704201f7 (diff)
downloadgit-62af4bdd423f5f3988dad97abcdd7adfba0756c4.zip
git-62af4bdd423f5f3988dad97abcdd7adfba0756c4.tar.gz
git-62af4bdd423f5f3988dad97abcdd7adfba0756c4.tar.bz2
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>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index eb90f18..4678378 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -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
)