test "$diff" = ""
'
+test_expect_success PERL 'difftool forwards arguments to diff' '
+ >for-diff &&
+ git add for-diff &&
+ echo changes>for-diff &&
+ git add for-diff &&
+ diff=$(git difftool --cached --no-prompt -- for-diff) &&
+ test "$diff" = "" &&
+ git reset -- for-diff &&
+ rm for-diff
+'
+
test_expect_success PERL 'difftool honors --gui' '
git config merge.tool bogus-tool &&
git config diff.tool bogus-tool &&
'
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 &&