summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba959de)
raw | patch | inline | side by side (parent: ba959de)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 14 Oct 2011 18:07:26 +0000 (11:07 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 14 Oct 2011 18:11:30 +0000 (11:11 -0700) |
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>
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>
t/t7800-difftool.sh | patch | blob | history |
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 7fc2b3af8662f703770c53133124fb6988ba23d5..4fb4c9384a0045d3b041d627e9d814637d9268e2 100755 (executable)
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
'
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 &&
'
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 &&