diff options
author | Theodore Dubois <tbodt@google.com> | 2020-09-30 21:50:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-01 17:50:24 +0200 |
commit | 3ad0401e9e6d3e243a21a3f376e36453572dcf0d (patch) | |
tree | 0b03cdecf73c881cd7e53d2068b6de9f4b158981 /git-submodule.sh | |
parent | Git 2.28 (diff) | |
download | git-3ad0401e9e6d3e243a21a3f376e36453572dcf0d.tar.xz git-3ad0401e9e6d3e243a21a3f376e36453572dcf0d.zip |
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 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 43eb6051d2..7dc44e3c46 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -465,7 +465,7 @@ cmd_update() GIT_QUIET=1 ;; -v) - GIT_QUIET=0 + unset GIT_QUIET ;; --progress) progress=1 @@ -639,13 +639,13 @@ cmd_update() say_msg="$(eval_gettext "Submodule path '\$displaypath': checked out '\$sha1'")" ;; rebase) - command="git rebase" + command="git rebase ${GIT_QUIET:+--quiet}" die_msg="$(eval_gettext "Unable to rebase '\$sha1' in submodule path '\$displaypath'")" say_msg="$(eval_gettext "Submodule path '\$displaypath': rebased into '\$sha1'")" must_die_on_failure=yes ;; merge) - command="git merge" + command="git merge ${GIT_QUIET:+--quiet}" die_msg="$(eval_gettext "Unable to merge '\$sha1' in submodule path '\$displaypath'")" say_msg="$(eval_gettext "Submodule path '\$displaypath': merged in '\$sha1'")" must_die_on_failure=yes |