Skip to content

Commit 0ca613d

Browse files
chooglengitster
authored andcommitted
submodule update: stop parsing options in .sh
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f3d9a69 commit 0ca613d

File tree

1 file changed

+0
-101
lines changed

1 file changed

+0
-101
lines changed

git-submodule.sh

Lines changed: 0 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -236,110 +236,9 @@ cmd_deinit()
236236
#
237237
cmd_update()
238238
{
239-
opts=
240-
# parse $args after "submodule ... update".
241-
while test $# -ne 0
242-
do
243-
case "$1" in
244-
-q|--quiet)
245-
opts="$opts $1"
246-
;;
247-
--progress)
248-
opts="$opts $1"
249-
;;
250-
-i|--init)
251-
opts="$opts $1"
252-
;;
253-
--require-init)
254-
opts="$opts $1"
255-
;;
256-
--remote)
257-
opts="$opts $1"
258-
;;
259-
-N|--no-fetch)
260-
opts="$opts $1"
261-
;;
262-
-f|--force)
263-
opts="$opts $1"
264-
;;
265-
-r|--rebase)
266-
opts="$opts $1"
267-
;;
268-
--reference)
269-
case "$2" in '') usage ;; esac
270-
opts="$opts $1 $2"
271-
shift
272-
;;
273-
--reference=*)
274-
opts="$opts $1"
275-
;;
276-
--dissociate)
277-
opts="$opts $1"
278-
;;
279-
-m|--merge)
280-
opts="$opts $1"
281-
;;
282-
--recursive)
283-
opts="$opts $1"
284-
;;
285-
--checkout)
286-
opts="$opts $1"
287-
;;
288-
--recommend-shallow)
289-
opts="$opts $1"
290-
;;
291-
--no-recommend-shallow)
292-
opts="$opts $1"
293-
;;
294-
--depth)
295-
case "$2" in '') usage ;; esac
296-
opts="$opts $1 $2"
297-
shift
298-
;;
299-
--depth=*)
300-
opts="$opts $1"
301-
;;
302-
-j|--jobs)
303-
case "$2" in '') usage ;; esac
304-
opts="$opts $1 $2"
305-
shift
306-
;;
307-
--jobs=*)
308-
opts="$opts $1"
309-
;;
310-
--single-branch)
311-
opts="$opts $1"
312-
;;
313-
--no-single-branch)
314-
opts="$opts $1"
315-
;;
316-
--filter)
317-
case "$2" in '') usage ;; esac
318-
opts="$opts $1 $2"
319-
shift
320-
;;
321-
--filter=*)
322-
opts="$opts $1"
323-
;;
324-
--)
325-
shift
326-
break
327-
;;
328-
-*)
329-
usage
330-
;;
331-
*)
332-
break
333-
;;
334-
esac
335-
shift
336-
done
337-
338239
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper update \
339240
${wt_prefix:+--prefix "$wt_prefix"} \
340241
${prefix:+--recursive-prefix "$prefix"} \
341-
$opts \
342-
-- \
343242
"$@"
344243
}
345244

0 commit comments

Comments
 (0)