diff options
author | Stefan Beller <sbeller@google.com> | 2018-08-14 11:22:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-14 12:48:28 -0700 |
commit | e84c3cf3dc3c3140d317f7ed0b18768adbec0401 (patch) | |
tree | 3a18eb8cf43cbb6a68f8e09a2de3424755610d00 /git-submodule.sh | |
parent | builtin/pull: respect verbosity settings in submodules (diff) | |
download | tgif-e84c3cf3dc3c3140d317f7ed0b18768adbec0401.tar.xz |
git-submodule.sh: accept verbose flag in cmd_update to be non-quiet
In a56771a668d (builtin/pull: respect verbosity settings in submodules,
2018-01-25), we made sure to pass on both quiet and verbose flag from
builtin/pull.c to the submodule shell script. However git-submodule doesn't
understand a verbose flag, which results in a bug when invoking
git pull --recurse-submodules -v [...]
There are a few different approaches to fix this bug:
1) rewrite 'argv_push_verbosity' or its caller in builtin/pull.c to
cap opt_verbosity at 0. Then 'argv_push_verbosity' would only add
'-q' if any.
2) Have a flag in 'argv_push_verbosity' that specifies if we allow adding
-q or -v (or both).
3) Add -v to git-submodule.sh and make it a no-op
(1) seems like a maintenance burden: What if we add code after
the submodule operations or move submodule operations higher up,
then we have altered the opt_verbosity setting further down the line
in builtin/pull.c.
(2) seems like it could work reasonably well without more regressions
(3) seems easiest to implement as well as actually is a feature with the
last-one-wins rule of passing flags to Git commands.
Reported-by: Jochen Kühner
Signed-off-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-x | git-submodule.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index c0d0e9a4c6..98049acc98 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -516,6 +516,9 @@ cmd_update() -q|--quiet) GIT_QUIET=1 ;; + -v) + GIT_QUIET=0 + ;; --progress) progress="--progress" ;; |