Skip to content

Commit e3402c6

Browse files
chooglengitster
authored andcommitted
submodule update: pass options with stuck forms
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9eaa74e commit e3402c6

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

git-submodule.sh

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export GIT_PROTOCOL_FROM_USER
3232
command=
3333
branch=
3434
force=
35-
reference=
3635
cached=
3736
recursive=
3837
init=
@@ -44,8 +43,6 @@ custom_name=
4443
depth=
4544
progress=
4645
dissociate=
47-
jobs=
48-
filter=
4946

5047
isnumber()
5148
{
@@ -277,11 +274,11 @@ cmd_update()
277274
;;
278275
--reference)
279276
case "$2" in '') usage ;; esac
280-
reference="--reference=$2"
277+
opts="$opts $1 $2"
281278
shift
282279
;;
283280
--reference=*)
284-
reference="$1"
281+
opts="$opts $1"
285282
;;
286283
--dissociate)
287284
opts="$opts $1"
@@ -303,19 +300,19 @@ cmd_update()
303300
;;
304301
--depth)
305302
case "$2" in '') usage ;; esac
306-
depth="--depth=$2"
303+
opts="$opts $1 $2"
307304
shift
308305
;;
309306
--depth=*)
310-
depth=$1
307+
opts="$opts $1"
311308
;;
312309
-j|--jobs)
313310
case "$2" in '') usage ;; esac
314-
jobs="--jobs=$2"
311+
opts="$opts $1 $2"
315312
shift
316313
;;
317314
--jobs=*)
318-
jobs=$1
315+
opts="$opts $1"
319316
;;
320317
--single-branch)
321318
opts="$opts $1"
@@ -325,11 +322,11 @@ cmd_update()
325322
;;
326323
--filter)
327324
case "$2" in '') usage ;; esac
328-
filter="--filter=$2"
325+
opts="$opts $1 $2"
329326
shift
330327
;;
331328
--filter=*)
332-
filter="$1"
329+
opts="$opts $1"
333330
;;
334331
--)
335332
shift
@@ -351,11 +348,7 @@ cmd_update()
351348
${wt_prefix:+--prefix "$wt_prefix"} \
352349
${prefix:+--recursive-prefix "$prefix"} \
353350
${update:+--update "$update"} \
354-
${reference:+"$reference"} \
355-
${depth:+"$depth"} \
356351
${require_init:+--require-init} \
357-
$jobs \
358-
$filter \
359352
$opts \
360353
-- \
361354
"$@"

0 commit comments

Comments
 (0)