pull.sh: quote $upload_pack when passing it to git-fetch

The previous code broke for example

  git pull --upload-pack 'echo --foo'

Reported-by: Joey Hess <id@joeyh.name>
Fix-suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Matthieu Moy 2015-07-30 22:40:03 +02:00 committed by Junio C Hamano
parent e3b601da2a
commit 22d6857d46

View file

@ -295,7 +295,7 @@ test true = "$rebase" && {
}
orig_head=$(git rev-parse -q --verify HEAD)
git fetch $verbosity $progress $dry_run $recurse_submodules $all $append \
$upload_pack $force $tags $prune $keep $depth $unshallow $update_shallow \
${upload_pack+"$upload_pack"} $force $tags $prune $keep $depth $unshallow $update_shallow \
$refmap --update-head-ok "$@" || exit 1
test -z "$dry_run" || exit 0