Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit b22d301

Browse files
committed
Merge branch 'da/difftool-test'
Makes sure "difftool" options can be given in any order. By David Aguilar * da/difftool-test: t7800: Test difftool passing arguments to diff
2 parents 3ff999e + d50b2c7 commit b22d301

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

t/t7800-difftool.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ test_expect_success PERL 'difftool ignores bad --tool values' '
8383
test "$diff" = ""
8484
'
8585

86+
test_expect_success PERL 'difftool forwards arguments to diff' '
87+
>for-diff &&
88+
git add for-diff &&
89+
echo changes>for-diff &&
90+
git add for-diff &&
91+
diff=$(git difftool --cached --no-prompt -- for-diff) &&
92+
test "$diff" = "" &&
93+
git reset -- for-diff &&
94+
rm for-diff
95+
'
96+
8697
test_expect_success PERL 'difftool honors --gui' '
8798
git config merge.tool bogus-tool &&
8899
git config diff.tool bogus-tool &&

0 commit comments

Comments
 (0)