[PATCH 3/8] submodule update: pass options with stuck forms

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

 



From: Glen Choo <chooglen@xxxxxxxxxx>

git-submodule.sh::cmd_update() converts 'unstuck' forms of options into
their 'stuck' forms before passing them to "git submodule--helper
update". Remove this special handling of 'unstuck' options and append
the options to `opts`.

Signed-off-by: Glen Choo <chooglen@xxxxxxxxxx>
---
 git-submodule.sh | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/git-submodule.sh b/git-submodule.sh
index 8c46eac22e8..7418fd5bf51 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -32,7 +32,6 @@ export GIT_PROTOCOL_FROM_USER
 command=
 branch=
 force=
-reference=
 cached=
 recursive=
 init=
@@ -44,8 +43,6 @@ custom_name=
 depth=
 progress=
 dissociate=
-jobs=
-filter=
 
 isnumber()
 {
@@ -277,11 +274,11 @@ cmd_update()
 			;;
 		--reference)
 			case "$2" in '') usage ;; esac
-			reference="--reference=$2"
+			opts="$opts $1 $2"
 			shift
 			;;
 		--reference=*)
-			reference="$1"
+			opts="$opts $1"
 			;;
 		--dissociate)
 			opts="$opts $1"
@@ -303,19 +300,19 @@ cmd_update()
 			;;
 		--depth)
 			case "$2" in '') usage ;; esac
-			depth="--depth=$2"
+			opts="$opts $1 $2"
 			shift
 			;;
 		--depth=*)
-			depth=$1
+			opts="$opts $1"
 			;;
 		-j|--jobs)
 			case "$2" in '') usage ;; esac
-			jobs="--jobs=$2"
+			opts="$opts $1 $2"
 			shift
 			;;
 		--jobs=*)
-			jobs=$1
+			opts="$opts $1"
 			;;
 		--single-branch)
 			opts="$opts $1"
@@ -325,11 +322,11 @@ cmd_update()
 			;;
 		--filter)
 			case "$2" in '') usage ;; esac
-			filter="--filter=$2"
+			opts="$opts $1 $2"
 			shift
 			;;
 		--filter=*)
-			filter="$1"
+			opts="$opts $1"
 			;;
 		--)
 			shift
@@ -351,11 +348,7 @@ cmd_update()
 		${wt_prefix:+--prefix "$wt_prefix"} \
 		${prefix:+--recursive-prefix "$prefix"} \
 		${update:+--update "$update"} \
-		${reference:+"$reference"} \
-		${depth:+"$depth"} \
 		${require_init:+--require-init} \
-		$jobs \
-		$filter \
 		$opts \
 		-- \
 		"$@"
-- 
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