submodule: clean up substitutions in script

'recommend_shallow' and 'jobs' variables do not need quotes. They only hold a
single token value, and even if they were multi-token it is likely we would want
them split at IFS rather than pass a single string.

'progress' is a boolean value. Treat it like the other boolean values in the
script by using a substitution.

Signed-off-by: Casey Fitzpatrick <kcghost@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Casey Fitzpatrick 2018-05-03 06:53:44 -04:00 committed by Junio C Hamano
parent 468165c1d8
commit c7199e3abe
1 changed files with 4 additions and 4 deletions

View File

@ -465,7 +465,7 @@ cmd_update()
GIT_QUIET=1 GIT_QUIET=1
;; ;;
--progress) --progress)
progress="--progress" progress=1
;; ;;
-i|--init) -i|--init)
init=1 init=1
@ -542,14 +542,14 @@ cmd_update()


{ {
git submodule--helper update-clone ${GIT_QUIET:+--quiet} \ git submodule--helper update-clone ${GIT_QUIET:+--quiet} \
${progress:+"$progress"} \ ${progress:+"--progress"} \
${wt_prefix:+--prefix "$wt_prefix"} \ ${wt_prefix:+--prefix "$wt_prefix"} \
${prefix:+--recursive-prefix "$prefix"} \ ${prefix:+--recursive-prefix "$prefix"} \
${update:+--update "$update"} \ ${update:+--update "$update"} \
${reference:+"$reference"} \ ${reference:+"$reference"} \
${depth:+--depth "$depth"} \ ${depth:+--depth "$depth"} \
${recommend_shallow:+"$recommend_shallow"} \ $recommend_shallow \
${jobs:+$jobs} \ $jobs \
"$@" || echo "#unmatched" $? "$@" || echo "#unmatched" $?
} | { } | {
err= err=