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>
This commit is contained in:
parent
8a7b73c152
commit
2c25eaa1b5
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user