push.default doc: explain simple after upstream
[gitweb.git] / t / t7800-difftool.sh
index 7fc2b3af8662f703770c53133124fb6988ba23d5..2763d795f0ae94c56a77fb630210df0928df468e 100755 (executable)
@@ -83,6 +83,17 @@ test_expect_success PERL 'difftool ignores bad --tool values' '
        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 &&
@@ -289,7 +300,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 +309,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 &&