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/t4039-diff-assume-unchanged.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 / t4039-diff-assume-unchanged.sh` 42 lines ยท 1015 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='diff with assume-unchanged entries' 4 5 . ./test-lib.sh 6 7 # external diff has been tested in t4020-diff-external.sh 8 9 test_expect_success 'setup' ' 10 echo zero > zero && 11 git add zero && 12 git commit -m zero && 13 echo one > one && 14 echo two > two && 15 blob=$(git hash-object one) && 16 git add one two && 17 git commit -m onetwo && 18 git update-index --assume-unchanged one && 19 echo borked >> one && 20 test "$(git ls-files -v one)" = "h one" 21 ' 22 23 test_expect_success 'diff-index does not examine assume-unchanged entries' ' 24 git diff-index HEAD^ -- one | grep -q $blob 25 ' 26 27 test_expect_success 'diff-files does not examine assume-unchanged entries' ' 28 rm one && 29 test -z "$(git diff-files -- one)" 30 ' 31 32 test_expect_success POSIXPERM 'find-copies-harder is not confused by mode bits' ' 33 echo content >exec && 34 chmod +x exec && 35 git add exec && 36 git commit -m exec && 37 git update-index --assume-unchanged exec && 38 git diff-files --find-copies-harder -- exec >actual && 39 test_must_be_empty actual 40 ' 41 42 test_done