The Git CodingGuidelines prefer the $( ... ) construct for command
substitution instead of using the back-quotes, or grave accents (`..`).

The backquoted form is the historical method for command substitution,
and is supported by POSIX. However, all but the simplest uses become
complicated quickly. In particular, embedded command substitutions
and/or the use of double quotes require careful escaping with the backslash
character. Because of this the POSIX shell adopted the $(…) feature from
the Korn shell.

The patch was generated by the simple script

for _f in $(find . -name "*.sh")
do
  sed -i 's@`\(.*\)`@$(\1)@g' ${_f}
done

Signed-off-by: Elia Pinto <gitter.spi...@gmail.com>
---
 t/t0010-racy-git.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh
index e45a9e4..5657c5a 100755
--- a/t/t0010-racy-git.sh
+++ b/t/t0010-racy-git.sh
@@ -14,7 +14,7 @@ do
        git update-index --add infocom
        echo xyzzy >infocom
 
-       files=`git diff-files -p`
+       files=$(git diff-files -p)
        test_expect_success \
        "Racy GIT trial #$trial part A" \
        'test "" != "$files"'
@@ -23,7 +23,7 @@ do
        echo xyzzy >cornerstone
        git update-index --add cornerstone
 
-       files=`git diff-files -p`
+       files=$(git diff-files -p)
        test_expect_success \
        "Racy GIT trial #$trial part B" \
        'test "" != "$files"'
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to