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/t3102-ls-tree-wildcards.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 / t3102-ls-tree-wildcards.sh` 36 lines ยท 816 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='ls-tree with(out) globs' 4 5 . ./test-lib.sh 6 7 test_expect_success 'setup' ' 8 mkdir a aa "a[a]" && 9 touch a/one aa/two "a[a]/three" && 10 git add a/one aa/two "a[a]/three" && 11 git commit -m test 12 ' 13 14 test_expect_success 'ls-tree a[a] matches literally' ' 15 cat >expect <<-EOF && 16 100644 blob $EMPTY_BLOB a[a]/three 17 EOF 18 git ls-tree -r HEAD "a[a]" >actual && 19 test_cmp expect actual 20 ' 21 22 test_expect_success 'ls-tree outside prefix' ' 23 cat >expect <<-EOF && 24 100644 blob $EMPTY_BLOB ../a[a]/three 25 EOF 26 ( cd aa && git ls-tree -r HEAD "../a[a]" ) >actual && 27 test_cmp expect actual 28 ' 29 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 34 ' 35 36 test_done