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>
Casey Fitzpatrick committed
May 3, 2018 at 06:53 UTC
c7199e3abe0280945ef1bd65abfc48321090edb6
1 file changed
+4
-4
git-submodule.sh
+4
-4
@@ -465,7 +465,7 @@ cmd_update()
465
GIT_QUIET=1
466
;;
467
--progress)
468
- progress="--progress"
468
+ progress=1
469
;;
470
-i|--init)
471
init=1
@@ -542,14 +542,14 @@ cmd_update()
542
543
{
544
git submodule--helper update-clone ${GIT_QUIET:+--quiet} \
545
- ${progress:+"$progress"} \
545
+ ${progress:+"--progress"} \
546
${wt_prefix:+--prefix "$wt_prefix"} \
547
${prefix:+--recursive-prefix "$prefix"} \
548
${update:+--update "$update"} \
549
${reference:+"$reference"} \
550
${depth:+--depth "$depth"} \
551
- ${recommend_shallow:+"$recommend_shallow"} \
552
- ${jobs:+$jobs} \
551
+ $recommend_shallow \
552
+ $jobs \
553
"$@" || echo "#unmatched" $?
554
} | {
555
err=