From: Glen Choo <chooglen@xxxxxxxxxx> 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@xxxxxxxxxx> --- git-submodule.sh | 101 ----------------------------------------------- 1 file changed, 101 deletions(-) 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 \ - -- \ "$@" } -- gitgitgadget