diff --cached: do not borrow from a work tree when a path is marked as assume-unchanged
[git/git.git] / t / t4020-diff-external.sh
index 637b4e1..f853b8a 100755 (executable)
@@ -107,4 +107,12 @@ test_expect_success 'force diff with "diff"' '
        test_cmp ../t4020/diff.NUL actual
 '
 
+test_expect_success 'diff --cached' '
+       git add file &&
+       git update-index --assume-unchanged file &&
+       echo second >file &&
+       git diff --cached >actual &&
+       test_cmp ../t4020/diff.NUL actual
+'
+
 test_done