From: Glen Choo <chooglen@xxxxxxxxxx> "git submodule--helper update" understands these options, so append them to `opts` and remove their intermediate variables. As a result, we now pass every instance of the option and its "no-" variant to "git submodule--helper update" instead of only passing the last instance. As we noted in the previous commit, this is good because this makes our options parsing consistent. Signed-off-by: Glen Choo <chooglen@xxxxxxxxxx> --- git-submodule.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index f4679e0db80..8c46eac22e8 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -296,10 +296,10 @@ cmd_update() update="checkout" ;; --recommend-shallow) - recommend_shallow="--recommend-shallow" + opts="$opts $1" ;; --no-recommend-shallow) - recommend_shallow="--no-recommend-shallow" + opts="$opts $1" ;; --depth) case "$2" in '') usage ;; esac @@ -318,10 +318,10 @@ cmd_update() jobs=$1 ;; --single-branch) - single_branch="--single-branch" + opts="$opts $1" ;; --no-single-branch) - single_branch="--no-single-branch" + opts="$opts $1" ;; --filter) case "$2" in '') usage ;; esac @@ -354,8 +354,6 @@ cmd_update() ${reference:+"$reference"} \ ${depth:+"$depth"} \ ${require_init:+--require-init} \ - $single_branch \ - $recommend_shallow \ $jobs \ $filter \ $opts \ -- gitgitgadget