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>
Elia Pinto committed
Dec 22, 2015 at 16:05 UTC
2c25eaa1b5c2f1507940e7f6108af36db714ba49
1 file changed
+12
-12
t/t1410-reflog.sh
+12
-12
@@ -62,18 +62,18 @@ test_expect_success setup '
62
git add . &&
63
64
test_tick && git commit -m rabbit &&
65
- H=`git rev-parse --verify HEAD` &&
66
- A=`git rev-parse --verify HEAD:A` &&
67
- B=`git rev-parse --verify HEAD:A/B` &&
68
- C=`git rev-parse --verify HEAD:C` &&
69
- D=`git rev-parse --verify HEAD:A/D` &&
70
- E=`git rev-parse --verify HEAD:A/B/E` &&
65
+ H=$(git rev-parse --verify HEAD) &&
66
+ A=$(git rev-parse --verify HEAD:A) &&
67
+ B=$(git rev-parse --verify HEAD:A/B) &&
68
+ C=$(git rev-parse --verify HEAD:C) &&
69
+ D=$(git rev-parse --verify HEAD:A/D) &&
70
+ E=$(git rev-parse --verify HEAD:A/B/E) &&
71
check_fsck &&
72
73
test_chmod +x C &&
74
git add C &&
75
test_tick && git commit -m dragon &&
76
- L=`git rev-parse --verify HEAD` &&
76
+ L=$(git rev-parse --verify HEAD) &&
77
check_fsck &&
78
79
rm -f C A/B/E &&
@@ -81,15 +81,15 @@ test_expect_success setup '
81
echo horse >A/G &&
82
git add F A/G &&
83
test_tick && git commit -a -m sheep &&
84
- F=`git rev-parse --verify HEAD:F` &&
85
- G=`git rev-parse --verify HEAD:A/G` &&
86
- I=`git rev-parse --verify HEAD:A` &&
87
- J=`git rev-parse --verify HEAD` &&
84
+ F=$(git rev-parse --verify HEAD:F) &&
85
+ G=$(git rev-parse --verify HEAD:A/G) &&
86
+ I=$(git rev-parse --verify HEAD:A) &&
87
+ J=$(git rev-parse --verify HEAD) &&
88
check_fsck &&
89
90
rm -f A/G &&
91
test_tick && git commit -a -m monkey &&
92
- K=`git rev-parse --verify HEAD` &&
92
+ K=$(git rev-parse --verify HEAD) &&
93
check_fsck &&
94
95
check_have A B C D E F G H I J K L &&