summaryrefslogtreecommitdiff
path: root/t/t3001-ls-files-others-exclude.sh
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-05-12 17:28:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-12 23:45:03 (GMT)
commita97c7a8bc4f2068b2e8c23ce8d17f7db8333ded0 (patch)
tree629aba00395e8d427f3cbc6b08f310d1f68c6b68 /t/t3001-ls-files-others-exclude.sh
parent2e4e43a6910393d681d095f515d41232c2372966 (diff)
downloadgit-a97c7a8bc4f2068b2e8c23ce8d17f7db8333ded0.zip
git-a97c7a8bc4f2068b2e8c23ce8d17f7db8333ded0.tar.gz
git-a97c7a8bc4f2068b2e8c23ce8d17f7db8333ded0.tar.bz2
t3001, t7300: add testcase showcasing missed directory traversal
In the last commit, we added a testcase showing that the directory traversal machinery sometimes traverses into directories unnecessarily. Here we show that there are cases where it does the opposite: it does not traverse into directories, despite those directories having important files that need to be flagged. Add a testcase showing that `git ls-files -o -i --directory` can omit some of the files it should be listing, and another showing that `git clean -fX` can fail to clean out some of the expected files. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3001-ls-files-others-exclude.sh')
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t3001-ls-files-others-exclude.sh b/t/t3001-ls-files-others-exclude.sh
index 1ec7cb5..ac05d1a 100755
--- a/t/t3001-ls-files-others-exclude.sh
+++ b/t/t3001-ls-files-others-exclude.sh
@@ -292,6 +292,11 @@ EOF
test_cmp expect actual
'
+test_expect_failure 'ls-files with "**" patterns and --directory' '
+ # Expectation same as previous test
+ git ls-files --directory -o -i --exclude "**/a.1" >actual &&
+ test_cmp expect actual
+'
test_expect_success 'ls-files with "**" patterns and no slashes' '
git ls-files -o -i --exclude "one**a.1" >actual &&