summaryrefslogtreecommitdiff
path: root/t/t1410-reflog.sh
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2015-12-22 15:05:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-12-27 23:44:49 (GMT)
commit2c25eaa1b5c2f1507940e7f6108af36db714ba49 (patch)
treee5fd9633c0a504c3536531a79d08b5a7d16cc23a /t/t1410-reflog.sh
parent8a7b73c1527c1bcad3230c791b8761a5101abf8d (diff)
downloadgit-2c25eaa1b5c2f1507940e7f6108af36db714ba49.zip
git-2c25eaa1b5c2f1507940e7f6108af36db714ba49.tar.gz
git-2c25eaa1b5c2f1507940e7f6108af36db714ba49.tar.bz2
t/t1410-reflog.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> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1410-reflog.sh')
-rwxr-xr-xt/t1410-reflog.sh24
1 files changed, 12 insertions, 12 deletions
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index b79049f..fbed8d7 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -62,18 +62,18 @@ test_expect_success setup '
git add . &&
test_tick && git commit -m rabbit &&
- H=`git rev-parse --verify HEAD` &&
- A=`git rev-parse --verify HEAD:A` &&
- B=`git rev-parse --verify HEAD:A/B` &&
- C=`git rev-parse --verify HEAD:C` &&
- D=`git rev-parse --verify HEAD:A/D` &&
- E=`git rev-parse --verify HEAD:A/B/E` &&
+ H=$(git rev-parse --verify HEAD) &&
+ A=$(git rev-parse --verify HEAD:A) &&
+ B=$(git rev-parse --verify HEAD:A/B) &&
+ C=$(git rev-parse --verify HEAD:C) &&
+ D=$(git rev-parse --verify HEAD:A/D) &&
+ E=$(git rev-parse --verify HEAD:A/B/E) &&
check_fsck &&
test_chmod +x C &&
git add C &&
test_tick && git commit -m dragon &&
- L=`git rev-parse --verify HEAD` &&
+ L=$(git rev-parse --verify HEAD) &&
check_fsck &&
rm -f C A/B/E &&
@@ -81,15 +81,15 @@ test_expect_success setup '
echo horse >A/G &&
git add F A/G &&
test_tick && git commit -a -m sheep &&
- F=`git rev-parse --verify HEAD:F` &&
- G=`git rev-parse --verify HEAD:A/G` &&
- I=`git rev-parse --verify HEAD:A` &&
- J=`git rev-parse --verify HEAD` &&
+ F=$(git rev-parse --verify HEAD:F) &&
+ G=$(git rev-parse --verify HEAD:A/G) &&
+ I=$(git rev-parse --verify HEAD:A) &&
+ J=$(git rev-parse --verify HEAD) &&
check_fsck &&
rm -f A/G &&
test_tick && git commit -a -m monkey &&
- K=`git rev-parse --verify HEAD` &&
+ K=$(git rev-parse --verify HEAD) &&
check_fsck &&
check_have A B C D E F G H I J K L &&