diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-25 16:06:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-25 16:08:58 -0700 |
commit | 13e0e28f530ae3e337c95b2e5c524f6904968cc0 (patch) | |
tree | 87a5bd6212f6e4f056c0ecb34d4691db6d4ed847 | |
parent | 22d6857d46de7ca28445c40782ba87a66416790d (diff) | |
download | git-13e0e28f530ae3e337c95b2e5c524f6904968cc0.tar.gz git-13e0e28f530ae3e337c95b2e5c524f6904968cc0.tar.xz |
pull: pass upload_pack only when it was given
The upload_pack shell variable is initialized to an empty string, so
conditional expansion with ${upload_pack+"$upload_pack"} would not
work very well. You need a colon there.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | git-pull.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-pull.sh b/git-pull.sh index 26c5e9ff6..e8dc2e0e7 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -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+"$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 |