diff --git a/repo_update.sh b/repo_update.sh index f50ff5c15f..f8e86e9816 100755 --- a/repo_update.sh +++ b/repo_update.sh @@ -31,10 +31,10 @@ apply_gerrit_cl_commit() { _ref=$1 _commit=$2 # Check whether the commit is already stored - if [ -z $(git rev-parse --quiet --verify $_commit^{commit}) ] + if [ -z "$(git rev-parse --quiet --verify "$_commit^{commit}")" ] # If not, fetch the ref from $LINK then - git fetch $LINK $_ref + git fetch "$LINK" "$_ref" _fetched=$(git rev-parse FETCH_HEAD) if [ "$_fetched" != "$_commit" ] then @@ -44,12 +44,12 @@ apply_gerrit_cl_commit() { fi git cherry-pick FETCH_HEAD else - git cherry-pick $_commit + git cherry-pick "$_commit" fi } if [ "$SKIP_SYNC" != "TRUE" ]; then - pushd $ANDROOT/.repo/local_manifests + pushd "$ANDROOT/.repo/local_manifests" git pull popd