t/t5522-pull-symlink.sh: use the $( ... ) construct for command substitution
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional 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. The patch was generated by: for _f in $(find . -name "*.sh") do perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Jan 4, 2016 at 10:10 UTC
91852b50a6366283652535b8eca940e72c205138
1 file changed
+1
-1
t/t5522-pull-symlink.sh
+1
-1
@@ -54,7 +54,7 @@ test_expect_success SYMLINKS 'pulling from real subdir' '
54
# git rev-parse --show-cdup printed a path relative to
55
# clone-repo/subdir/, not subdir-link/. Git rev-parse --show-cdup
56
# used the correct .git, but when the git pull shell script did
57
-# "cd `git rev-parse --show-cdup`", it ended up in the wrong
57
+# "cd $(git rev-parse --show-cdup)", it ended up in the wrong
58
# directory. A POSIX shell's "cd" works a little differently
59
# than chdir() in C; "cd -P" is much closer to chdir().
60
#