Skip to content

Commit f3d9a69

Browse files
chooglengitster
authored andcommitted
submodule update: remove -v, pass --quiet
In cmd_update(), "-v" unsets GIT_QUIET, but this does nothing because GIT_QUIET is only set when "-q|--quiet" is passed. Remove "-v", and since "git submodule--helper update" already understands 'quiet' options, append them to `opts`. This makes GIT_QUIET obsolete, so remove it. Signed-off-by: Glen Choo <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0e795b2 commit f3d9a69

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

git-submodule.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,7 @@ cmd_update()
242242
do
243243
case "$1" in
244244
-q|--quiet)
245-
GIT_QUIET=1
246-
;;
247-
-v)
248-
unset GIT_QUIET
245+
opts="$opts $1"
249246
;;
250247
--progress)
251248
opts="$opts $1"
@@ -339,7 +336,6 @@ cmd_update()
339336
done
340337

341338
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper update \
342-
${GIT_QUIET:+--quiet} \
343339
${wt_prefix:+--prefix "$wt_prefix"} \
344340
${prefix:+--recursive-prefix "$prefix"} \
345341
$opts \

t/t7406-submodule-update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ test_expect_success 'submodule update --quiet passes quietness to merge/rebase'
10741074
git submodule update --rebase --quiet >out 2>err &&
10751075
test_must_be_empty out &&
10761076
test_must_be_empty err &&
1077-
git submodule update --rebase -v >out 2>err &&
1077+
git submodule update --rebase >out 2>err &&
10781078
test_file_not_empty out &&
10791079
test_must_be_empty err
10801080
)

0 commit comments

Comments
 (0)