summaryrefslogtreecommitdiff
path: root/t/t7800-difftool.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-14 11:07:26 -0700
committerJunio C Hamano <gitster@pobox.com>2011-10-14 11:11:30 -0700
commit15a31e78852f4ede5335552875006daeedfc3aa7 (patch)
treec02cf827900b476d7a1862903600e53fee550d2e /t/t7800-difftool.sh
parentba959de165c6fc0d08d851894a98778e739aafc9 (diff)
downloadgit-15a31e78852f4ede5335552875006daeedfc3aa7.tar.gz
t7800: avoid arithmetic expansion notationsc/difftool-skip
The construct "var=$(( something ..." is interpreted by some shells as arithmetic expansion, even when it clearly is not, e.g. var=$((foo; bar) | baz) Avoid the issue by giving an extra SP to help the parser, i.e. var=$( (foo; bar) | baz ) Noticed by Michael J Gruber. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-xt/t7800-difftool.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 7fc2b3af86..4fb4c9384a 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -289,7 +289,7 @@ test_expect_success PERL 'setup with 2 files different' '
'
test_expect_success PERL 'say no to the first file' '
- diff=$((echo n; echo) | git difftool -x cat branch) &&
+ diff=$( (echo n; echo) | git difftool -x cat branch ) &&
echo "$diff" | stdin_contains m2 &&
echo "$diff" | stdin_contains br2 &&
@@ -298,7 +298,7 @@ test_expect_success PERL 'say no to the first file' '
'
test_expect_success PERL 'say no to the second file' '
- diff=$((echo; echo n) | git difftool -x cat branch) &&
+ diff=$( (echo; echo n) | git difftool -x cat branch ) &&
echo "$diff" | stdin_contains master &&
echo "$diff" | stdin_contains branch &&