Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t3003-ls-files-exclude.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t3003-ls-files-exclude.sh` 41 lines ยท 837 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='ls-files --exclude does not affect index files' 4 5 . ./test-lib.sh 6 7 test_expect_success 'create repo with file' ' 8 echo content >file && 9 git add file && 10 git commit -m file && 11 echo modification >file 12 ' 13 14 check_output() { 15 test_expect_success "ls-files output contains file ($1)" " 16 echo '$2' >expect && 17 git ls-files --exclude-standard --$1 >output && 18 test_cmp expect output 19 " 20 } 21 22 check_all_output() { 23 check_output 'cached' 'file' 24 check_output 'modified' 'file' 25 } 26 27 check_all_output 28 test_expect_success 'add file to gitignore' ' 29 echo file >.gitignore 30 ' 31 check_all_output 32 33 test_expect_success 'ls-files -i -c lists only tracked-but-ignored files' ' 34 echo content >other-file && 35 git add other-file && 36 echo file >expect && 37 git ls-files -i -c --exclude-standard >output && 38 test_cmp expect output 39 ' 40 41 test_done