3 test_description='ls-files --exclude does not affect index files'
6 test_expect_success 'create repo with file' '
10 echo modification >file
14 test_expect_success "ls-files output contains file ($1)" "
16 git ls-files --exclude-standard --$1 >output &&
17 test_cmp expect output
22 check_output 'cached' 'file'
23 check_output 'modified' 'file'
27 test_expect_success 'add file to gitignore' '
32 test_expect_success 'ls-files -i lists only tracked-but-ignored files' '
33 echo content >other-file &&
36 git ls-files -i --exclude-standard >output &&
37 test_cmp expect output