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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Glen Choo <chooglen@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 git-submodule.sh            | 6 +-----
 t/t7406-submodule-update.sh | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

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
 	)
-- 
gitgitgadget




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux