Skip to content

Commit

Permalink
Remove quotes from subshell call in tools/split.sh
Browse files Browse the repository at this point in the history
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 <zhaolei@cn.fujitsu.com>
  • Loading branch information
zhaoleidd committed Aug 7, 2015
1 parent 78e6ddb commit ed9703e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/split.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed9703e

Please sign in to comment.