aboutsummaryrefslogtreecommitdiff
path: root/t/t5515-fetch-merge-logic.sh
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2015-12-23 14:45:56 +0100
committerJunio C Hamano <gitster@pobox.com>2015-12-28 13:37:04 -0800
commit28666e55f3bc3f7731a58085f23f21d38ec005f4 (patch)
treee1f3b7a2a4390f17a0629f9bafc09e6fdf68c2a1 /t/t5515-fetch-merge-logic.sh
parenta9d32be4d28d8f1d0d82788ffd1c3bd6de82931e (diff)
downloadgit-28666e55f3bc3f7731a58085f23f21d38ec005f4.tar.gz
git-28666e55f3bc3f7731a58085f23f21d38ec005f4.tar.xz
t/t5515-fetch-merge-logic.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>
Diffstat (limited to 't/t5515-fetch-merge-logic.sh')
-rwxr-xr-xt/t5515-fetch-merge-logic.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh
index dbb927dec..36b0dbc01 100755
--- a/t/t5515-fetch-merge-logic.sh
+++ b/t/t5515-fetch-merge-logic.sh
@@ -128,8 +128,8 @@ do
case "$cmd" in
'' | '#'*) continue ;;
esac
- test=`echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g'`
- pfx=`printf "%04d" $test_count`
+ test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
+ pfx=$(printf "%04d" $test_count)
expect_f="$TEST_DIRECTORY/t5515/fetch.$test"
actual_f="$pfx-fetch.$test"
expect_r="$TEST_DIRECTORY/t5515/refs.$test"