summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2016-01-08 12:06:19 +0100
committerJunio C Hamano <gitster@pobox.com>2016-01-08 12:54:04 -0800
commit57109790dcf6b2da7bc5e73d31c1dd85c399a6a2 (patch)
tree989881a9632a49a04f80dc06deda8693a3fd9f56
parent90ae5d27166580addfb24347e43df6809a28b5e1 (diff)
downloadgit-57109790dcf6b2da7bc5e73d31c1dd85c399a6a2.tar.gz
t/t7103-reset-bare.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>
-rwxr-xr-xt/t7103-reset-bare.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t7103-reset-bare.sh b/t/t7103-reset-bare.sh
index 1eef93c2b2..afe36a533c 100755
--- a/t/t7103-reset-bare.sh
+++ b/t/t7103-reset-bare.sh
@@ -63,7 +63,7 @@ test_expect_success '"mixed" reset is not allowed in bare' '
test_expect_success '"soft" reset is allowed in bare' '
git reset --soft HEAD^ &&
- test "`git show --pretty=format:%s | head -n 1`" = "one"
+ test "$(git show --pretty=format:%s | head -n 1)" = "one"
'
test_done