From ae4c094e3744de5b7ec97c8edada78fa9adf9fa5 Mon Sep 17 00:00:00 2001 From: Elia Pinto Date: Thu, 7 Jan 2016 14:51:44 +0100 Subject: t/t6015-rev-list-show-all-parents.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 Signed-off-by: Junio C Hamano diff --git a/t/t6015-rev-list-show-all-parents.sh b/t/t6015-rev-list-show-all-parents.sh index 8b146fb..3c73c93 100755 --- a/t/t6015-rev-list-show-all-parents.sh +++ b/t/t6015-rev-list-show-all-parents.sh @@ -6,11 +6,11 @@ test_description='--show-all --parents does not rewrite TREESAME commits' test_expect_success 'set up --show-all --parents test' ' test_commit one foo.txt && - commit1=`git rev-list -1 HEAD` && + commit1=$(git rev-list -1 HEAD) && test_commit two bar.txt && - commit2=`git rev-list -1 HEAD` && + commit2=$(git rev-list -1 HEAD) && test_commit three foo.txt && - commit3=`git rev-list -1 HEAD` + commit3=$(git rev-list -1 HEAD) ' test_expect_success '--parents rewrites TREESAME parents correctly' ' -- cgit v0.10.2-6-g49f6