Remove quotes from subshell call in bash script

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, only to use a better code style.

Change-Id: I3c87987d3b992c8363ef236a04ae6e35c1315535
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
This commit is contained in:
Zhao Lei 2015-09-23 18:44:33 +08:00
parent dcfc9336e7
commit 19378504b5
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,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