3 test_description
='ls-files --exclude does not affect index files'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'create repo with file' '
12 echo modification >file
16 test_expect_success
"ls-files output contains file ($1)" "
18 git ls-files --exclude-standard --$1 >output &&
19 test_cmp expect output
24 check_output
'cached' 'file'
25 check_output
'modified' 'file'
29 test_expect_success
'add file to gitignore' '
34 test_expect_success
'ls-files -i -c lists only tracked-but-ignored files' '
35 echo content >other-file &&
38 git ls-files -i -c --exclude-standard >output &&
39 test_cmp expect output