| test_description='ls-files --exclude does not affect index files' |
| TEST_PASSES_SANITIZE_LEAK=true |
| test_expect_success 'create repo with file' ' |
| test_expect_success "ls-files output contains file ($1)" " |
| git ls-files --exclude-standard --$1 >output && |
| check_output 'cached' 'file' |
| check_output 'modified' 'file' |
| test_expect_success 'add file to gitignore' ' |
| test_expect_success 'ls-files -i -c lists only tracked-but-ignored files' ' |
| echo content >other-file && |
| git ls-files -i -c --exclude-standard >output && |