| test_description='ls-tree with(out) globs' |
| test_expect_success 'setup' ' |
| touch a/one aa/two "a[a]/three" && |
| git add a/one aa/two "a[a]/three" && |
| test_expect_success 'ls-tree a[a] matches literally' ' |
| 100644 blob $EMPTY_BLOB a[a]/three |
| git ls-tree -r HEAD "a[a]" >actual && |
| test_expect_success 'ls-tree outside prefix' ' |
| 100644 blob $EMPTY_BLOB ../a[a]/three |
| ( cd aa && git ls-tree -r HEAD "../a[a]" ) >actual && |
| test_expect_failure 'ls-tree does not yet support negated pathspec' ' |
| git ls-files ":(exclude)a" "a*" >expect && |
| git ls-tree --name-only -r HEAD ":(exclude)a" "a*" >actual && |