From: Zhao Lei Date: Fri, 7 Aug 2015 13:17:20 +0000 (+0800) Subject: Remove quotes from subshell call in tools/split.sh X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ed9703e3edc1290b57132e408e2d1c1d021d9477;p=openstack-build%2Fneutron-build.git Remove quotes from subshell call in tools/split.sh Always no quotes for $() statement. We don't need quotes to hold blanks in result: # i=$(echo 1 2 3) # echo $i 1 2 3 # These quotes can make something wrong in some case: # i=$(echo '!') # # i="$(echo '!')" -bash: !: event not found # No real problem for current code in split.sh, only to use a better code style. Change-Id: Ib86d59e10be0aca4774ad2fc656915a96b1b6c74 Signed-off-by: Zhao Lei --- diff --git a/tools/split.sh b/tools/split.sh index 5eb7d8ece..995d937a7 100755 --- a/tools/split.sh +++ b/tools/split.sh @@ -45,7 +45,7 @@ pruner="git ls-files | grep -v \"$keep_pattern\" | git update-index --force-remo roots="" for file in $files_to_keep; do - file_root="$(git rev-list --reverse HEAD -- $file | head -n1)" + file_root=$(git rev-list --reverse HEAD -- $file | head -n1) fail=0 for root in $roots; do if git merge-base --is-ancestor $root $file_root; then