Use the final_oid_fn to finalize hashing of object IDs
[alt-git.git] / t / t4039-diff-assume-unchanged.sh
blob0eb0314a8b35daecd3a442592bac4de1c480ffe0
1 #!/bin/sh
3 test_description='diff with assume-unchanged entries'
5 . ./test-lib.sh
7 # external diff has been tested in t4020-diff-external.sh
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"
23 test_expect_success 'diff-index does not examine assume-unchanged entries' '
24 git diff-index HEAD^ -- one | grep -q $blob
27 test_expect_success 'diff-files does not examine assume-unchanged entries' '
28 rm one &&
29 test -z "$(git diff-files -- one)"
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
42 test_done