3 test_description
='ls-tree with(out) globs'
7 test_expect_success
'setup' '
9 touch a/one aa/two "a[a]/three" &&
10 git add a/one aa/two "a[a]/three" &&
14 test_expect_success
'ls-tree a[a] matches literally' '
16 100644 blob $EMPTY_BLOB a[a]/three
18 git ls-tree -r HEAD "a[a]" >actual &&
19 test_cmp expect actual
22 test_expect_success
'ls-tree outside prefix' '
24 100644 blob $EMPTY_BLOB ../a[a]/three
26 ( cd aa && git ls-tree -r HEAD "../a[a]"; ) >actual &&
27 test_cmp expect actual
30 test_expect_failure
'ls-tree does not yet support negated pathspec' '
31 git ls-files ":(exclude)a" "a*" >expect &&
32 git ls-tree --name-only -r HEAD ":(exclude)a" "a*" >actual &&
33 test_cmp expect actual