t/t6001-rev-list-graft.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>
This commit is contained in:
parent
14a771eee9
commit
11da571a2f
@ -10,15 +10,15 @@ test_expect_success setup '
|
||||
echo >subdir/fileB fileB &&
|
||||
git add fileA subdir/fileB &&
|
||||
git commit -a -m "Initial in one history." &&
|
||||
A0=`git rev-parse --verify HEAD` &&
|
||||
A0=$(git rev-parse --verify HEAD) &&
|
||||
|
||||
echo >fileA fileA modified &&
|
||||
git commit -a -m "Second in one history." &&
|
||||
A1=`git rev-parse --verify HEAD` &&
|
||||
A1=$(git rev-parse --verify HEAD) &&
|
||||
|
||||
echo >subdir/fileB fileB modified &&
|
||||
git commit -a -m "Third in one history." &&
|
||||
A2=`git rev-parse --verify HEAD` &&
|
||||
A2=$(git rev-parse --verify HEAD) &&
|
||||
|
||||
rm -f .git/refs/heads/master .git/index &&
|
||||
|
||||
@ -26,15 +26,15 @@ test_expect_success setup '
|
||||
echo >subdir/fileB fileB again &&
|
||||
git add fileA subdir/fileB &&
|
||||
git commit -a -m "Initial in alternate history." &&
|
||||
B0=`git rev-parse --verify HEAD` &&
|
||||
B0=$(git rev-parse --verify HEAD) &&
|
||||
|
||||
echo >fileA fileA modified in alternate history &&
|
||||
git commit -a -m "Second in alternate history." &&
|
||||
B1=`git rev-parse --verify HEAD` &&
|
||||
B1=$(git rev-parse --verify HEAD) &&
|
||||
|
||||
echo >subdir/fileB fileB modified in alternate history &&
|
||||
git commit -a -m "Third in alternate history." &&
|
||||
B2=`git rev-parse --verify HEAD` &&
|
||||
B2=$(git rev-parse --verify HEAD) &&
|
||||
: done
|
||||
'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user