diff mbox series

[6/8] submodule update: remove -v, pass --quiet

Message ID fbdfab55f563c2a6dff8485d6870baf472b2e12f.1654820781.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series submodule update: parse all options in C | expand

Commit Message

Glen Choo June 10, 2022, 12:26 a.m. UTC
From: Glen Choo <chooglen@google.com>

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 <chooglen@google.com>
---
 git-submodule.sh            | 6 +-----
 t/t7406-submodule-update.sh | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/git-submodule.sh b/git-submodule.sh
index d93b6dfbbd7..6b3f161dc53 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -242,10 +242,7 @@  cmd_update()
 	do
 		case "$1" in
 		-q|--quiet)
-			GIT_QUIET=1
-			;;
-		-v)
-			unset GIT_QUIET
+			opts="$opts $1"
 			;;
 		--progress)
 			opts="$opts $1"
@@ -339,7 +336,6 @@  cmd_update()
 	done
 
 	git ${wt_prefix:+-C "$wt_prefix"} submodule--helper update \
-		${GIT_QUIET:+--quiet} \
 		${wt_prefix:+--prefix "$wt_prefix"} \
 		${prefix:+--recursive-prefix "$prefix"} \
 		$opts \
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index 43f779d751c..06d804e2131 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -1074,7 +1074,7 @@  test_expect_success 'submodule update --quiet passes quietness to merge/rebase'
 	 git submodule update --rebase --quiet >out 2>err &&
 	 test_must_be_empty out &&
 	 test_must_be_empty err &&
-	 git submodule update --rebase -v >out 2>err &&
+	 git submodule update --rebase >out 2>err &&
 	 test_file_not_empty out &&
 	 test_must_be_empty err
 	)