Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t4040-whitespace-status.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t4040-whitespace-status.sh` 75 lines ยท 1801 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='diff --exit-code with whitespace' 4 5 . ./test-lib.sh 6 7 test_expect_success setup ' 8 mkdir a b && 9 echo >c && 10 echo >a/d && 11 echo >b/e && 12 git add . && 13 test_tick && 14 git commit -m initial && 15 echo " " >a/d && 16 test_tick && 17 git commit -a -m second && 18 echo " " >a/d && 19 echo " " >b/e && 20 git add a/d 21 ' 22 23 test_expect_success 'diff-tree --exit-code' ' 24 test_must_fail git diff --exit-code HEAD^ HEAD && 25 test_must_fail git diff-tree --exit-code HEAD^ HEAD 26 ' 27 28 test_expect_success 'diff-tree -b --exit-code' ' 29 git diff -b --exit-code HEAD^ HEAD && 30 git diff-tree -b -p --exit-code HEAD^ HEAD 31 ' 32 33 test_expect_success 'diff-index --cached --exit-code' ' 34 test_must_fail git diff --cached --exit-code HEAD && 35 test_must_fail git diff-index --cached --exit-code HEAD 36 ' 37 38 test_expect_success 'diff-index -b -p --cached --exit-code' ' 39 git diff -b --cached --exit-code HEAD && 40 git diff-index -b -p --cached --exit-code HEAD 41 ' 42 43 test_expect_success 'diff-index --exit-code' ' 44 test_must_fail git diff --exit-code HEAD && 45 test_must_fail git diff-index --exit-code HEAD 46 ' 47 48 test_expect_success 'diff-index -b -p --exit-code' ' 49 git diff -b --exit-code HEAD && 50 git diff-index -b -p --exit-code HEAD 51 ' 52 53 test_expect_success 'diff-files --exit-code' ' 54 test_must_fail git diff --exit-code && 55 test_must_fail git diff-files --exit-code 56 ' 57 58 test_expect_success 'diff-files -b -p --exit-code' ' 59 git diff -b --exit-code && 60 git diff-files -b -p --exit-code 61 ' 62 63 test_expect_success 'diff-files --diff-filter --quiet' ' 64 git reset --hard && 65 rm a/d && 66 echo x >>b/e && 67 test_must_fail git diff-files --diff-filter=M --quiet 68 ' 69 70 test_expect_success 'diff-tree --diff-filter --quiet' ' 71 git commit -a -m "worktree state" && 72 test_must_fail git diff-tree --diff-filter=M --quiet HEAD^ HEAD 73 ' 74 75 test_done