mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
t4116-apply-reverse.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 sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
274447aa6b
commit
991a9c3af9
|
@ -30,10 +30,10 @@ test_expect_success setup '
|
||||||
|
|
||||||
test_expect_success 'apply in forward' '
|
test_expect_success 'apply in forward' '
|
||||||
|
|
||||||
T0=`git rev-parse "second^{tree}"` &&
|
T0=$(git rev-parse "second^{tree}") &&
|
||||||
git reset --hard initial &&
|
git reset --hard initial &&
|
||||||
git apply --index --binary patch &&
|
git apply --index --binary patch &&
|
||||||
T1=`git write-tree` &&
|
T1=$(git write-tree) &&
|
||||||
test "$T0" = "$T1"
|
test "$T0" = "$T1"
|
||||||
'
|
'
|
||||||
|
|
||||||
|
@ -62,22 +62,22 @@ test_expect_success 'setup separate repository lacking postimage' '
|
||||||
|
|
||||||
test_expect_success 'apply in forward without postimage' '
|
test_expect_success 'apply in forward without postimage' '
|
||||||
|
|
||||||
T0=`git rev-parse "second^{tree}"` &&
|
T0=$(git rev-parse "second^{tree}") &&
|
||||||
(
|
(
|
||||||
cd initial &&
|
cd initial &&
|
||||||
git apply --index --binary ../patch &&
|
git apply --index --binary ../patch &&
|
||||||
T1=`git write-tree` &&
|
T1=$(git write-tree) &&
|
||||||
test "$T0" = "$T1"
|
test "$T0" = "$T1"
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'apply in reverse without postimage' '
|
test_expect_success 'apply in reverse without postimage' '
|
||||||
|
|
||||||
T0=`git rev-parse "initial^{tree}"` &&
|
T0=$(git rev-parse "initial^{tree}") &&
|
||||||
(
|
(
|
||||||
cd second &&
|
cd second &&
|
||||||
git apply --index --binary --reverse ../patch &&
|
git apply --index --binary --reverse ../patch &&
|
||||||
T1=`git write-tree` &&
|
T1=$(git write-tree) &&
|
||||||
test "$T0" = "$T1"
|
test "$T0" = "$T1"
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
Loading…
Reference in a new issue