summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Fitzpatrick <kcghost@gmail.com>2018-05-03 10:53:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-22 03:16:31 (GMT)
commitc7199e3abe0280945ef1bd65abfc48321090edb6 (patch)
tree6dc75b6ffcd2d0b6dd0e41d72f966ac3d47b0e3b
parent468165c1d8a442994a825f3684528361727cd8c0 (diff)
downloadgit-c7199e3abe0280945ef1bd65abfc48321090edb6.zip
git-c7199e3abe0280945ef1bd65abfc48321090edb6.tar.gz
git-c7199e3abe0280945ef1bd65abfc48321090edb6.tar.bz2
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>
-rwxr-xr-xgit-submodule.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 2491496..2625479 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -465,7 +465,7 @@ cmd_update()
GIT_QUIET=1
;;
--progress)
- progress="--progress"
+ progress=1
;;
-i|--init)
init=1
@@ -542,14 +542,14 @@ cmd_update()
{
git submodule--helper update-clone ${GIT_QUIET:+--quiet} \
- ${progress:+"$progress"} \
+ ${progress:+"--progress"} \
${wt_prefix:+--prefix "$wt_prefix"} \
${prefix:+--recursive-prefix "$prefix"} \
${update:+--update "$update"} \
${reference:+"$reference"} \
${depth:+--depth "$depth"} \
- ${recommend_shallow:+"$recommend_shallow"} \
- ${jobs:+$jobs} \
+ $recommend_shallow \
+ $jobs \
"$@" || echo "#unmatched" $?
} | {
err=