Merge commit 'refs/top-bases/next' into next
[git/gitweb.git] / t / t3003-ls-files-exclude.sh
blobfc1e379321a5ccd278951b7aaa21f677f7cbc960
1 #!/bin/sh
3 test_description='ls-files --exclude does not affect index files'
4 . ./test-lib.sh
6 test_expect_success 'create repo with file' '
7 echo content >file &&
8 git add file &&
9 git commit -m file &&
10 echo modification >file
13 check_output() {
14 test_expect_success "ls-files output contains file ($1)" "
15 echo '$2' >expect &&
16 git ls-files --exclude-standard --$1 >output &&
17 test_cmp expect output
21 check_all_output() {
22 check_output 'cached' 'file'
23 check_output 'modified' 'file'
26 check_all_output
27 test_expect_success 'add file to gitignore' '
28 echo file >.gitignore
30 check_all_output
32 test_done