3 test_description
='diff --exit-code with whitespace'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success setup
'
15 git commit -m initial &&
18 git commit -a -m second &&
24 test_expect_success
'diff-tree --exit-code' '
25 test_must_fail git diff --exit-code HEAD^ HEAD &&
26 test_must_fail git diff-tree --exit-code HEAD^ HEAD
29 test_expect_success
'diff-tree -b --exit-code' '
30 git diff -b --exit-code HEAD^ HEAD &&
31 git diff-tree -b -p --exit-code HEAD^ HEAD
34 test_expect_success
'diff-index --cached --exit-code' '
35 test_must_fail git diff --cached --exit-code HEAD &&
36 test_must_fail git diff-index --cached --exit-code HEAD
39 test_expect_success
'diff-index -b -p --cached --exit-code' '
40 git diff -b --cached --exit-code HEAD &&
41 git diff-index -b -p --cached --exit-code HEAD
44 test_expect_success
'diff-index --exit-code' '
45 test_must_fail git diff --exit-code HEAD &&
46 test_must_fail git diff-index --exit-code HEAD
49 test_expect_success
'diff-index -b -p --exit-code' '
50 git diff -b --exit-code HEAD &&
51 git diff-index -b -p --exit-code HEAD
54 test_expect_success
'diff-files --exit-code' '
55 test_must_fail git diff --exit-code &&
56 test_must_fail git diff-files --exit-code
59 test_expect_success
'diff-files -b -p --exit-code' '
60 git diff -b --exit-code &&
61 git diff-files -b -p --exit-code
64 test_expect_success
'diff-files --diff-filter --quiet' '
68 test_must_fail git diff-files --diff-filter=M --quiet
71 test_expect_success
'diff-tree --diff-filter --quiet' '
72 git commit -a -m "worktree state" &&
73 test_must_fail git diff-tree --diff-filter=M --quiet HEAD^ HEAD