diff mbox series

[7/8] submodule update: stop parsing options in .sh

Message ID 6c496ef31526c45686b0ac6e685f655bdbb003de.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>

cmd_update()'s option parsing loop is now obsolete - it only
appends options to `opts` without doing additional parsing. Remove it.

Signed-off-by: Glen Choo <chooglen@google.com>
---
 git-submodule.sh | 101 -----------------------------------------------
 1 file changed, 101 deletions(-)
diff mbox series

Patch

diff --git a/git-submodule.sh b/git-submodule.sh
index 6b3f161dc53..e9d93e91d21 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -236,110 +236,9 @@  cmd_deinit()
 #
 cmd_update()
 {
-	opts=
-	# parse $args after "submodule ... update".
-	while test $# -ne 0
-	do
-		case "$1" in
-		-q|--quiet)
-			opts="$opts $1"
-			;;
-		--progress)
-			opts="$opts $1"
-			;;
-		-i|--init)
-			opts="$opts $1"
-			;;
-		--require-init)
-			opts="$opts $1"
-			;;
-		--remote)
-			opts="$opts $1"
-			;;
-		-N|--no-fetch)
-			opts="$opts $1"
-			;;
-		-f|--force)
-			opts="$opts $1"
-			;;
-		-r|--rebase)
-			opts="$opts $1"
-			;;
-		--reference)
-			case "$2" in '') usage ;; esac
-			opts="$opts $1 $2"
-			shift
-			;;
-		--reference=*)
-			opts="$opts $1"
-			;;
-		--dissociate)
-			opts="$opts $1"
-			;;
-		-m|--merge)
-			opts="$opts $1"
-			;;
-		--recursive)
-			opts="$opts $1"
-			;;
-		--checkout)
-			opts="$opts $1"
-			;;
-		--recommend-shallow)
-			opts="$opts $1"
-			;;
-		--no-recommend-shallow)
-			opts="$opts $1"
-			;;
-		--depth)
-			case "$2" in '') usage ;; esac
-			opts="$opts $1 $2"
-			shift
-			;;
-		--depth=*)
-			opts="$opts $1"
-			;;
-		-j|--jobs)
-			case "$2" in '') usage ;; esac
-			opts="$opts $1 $2"
-			shift
-			;;
-		--jobs=*)
-			opts="$opts $1"
-			;;
-		--single-branch)
-			opts="$opts $1"
-			;;
-		--no-single-branch)
-			opts="$opts $1"
-			;;
-		--filter)
-			case "$2" in '') usage ;; esac
-			opts="$opts $1 $2"
-			shift
-			;;
-		--filter=*)
-			opts="$opts $1"
-			;;
-		--)
-			shift
-			break
-			;;
-		-*)
-			usage
-			;;
-		*)
-			break
-			;;
-		esac
-		shift
-	done
-
 	git ${wt_prefix:+-C "$wt_prefix"} submodule--helper update \
 		${wt_prefix:+--prefix "$wt_prefix"} \
 		${prefix:+--recursive-prefix "$prefix"} \
-		$opts \
-		-- \
 		"$@"
 }