summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-11-23 14:48:11 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-11-23 14:48:11 -0800
commiteef0a8e7c1ea6987fe2a6acaf21f612d66974aff (patch)
tree63aeb646e1cb9f3d93cce33f2b7501298d76545e /t
parentMerge branch 'ab/update-submitting-patches' into maint (diff)
parentdir: revert "dir: select directories correctly" (diff)
downloadtgif-eef0a8e7c1ea6987fe2a6acaf21f612d66974aff.tar.xz
Merge branch 'ds/add-rm-with-sparse-index' into maint
Regression fix for 2.34 * ds/add-rm-with-sparse-index: dir: revert "dir: select directories correctly"
Diffstat (limited to 't')
-rwxr-xr-xt/t0008-ignores.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index 1889cfc60e..42d2314804 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -829,6 +829,23 @@ test_expect_success 'exact prefix matching (without root)' '
test_cmp expect actual
'
+test_expect_success 'directories and ** matches' '
+ cat >.gitignore <<-\EOF &&
+ data/**
+ !data/**/
+ !data/**/*.txt
+ EOF
+ git check-ignore file \
+ data/file data/data1/file1 data/data1/file1.txt \
+ data/data2/file2 data/data2/file2.txt >actual &&
+ cat >expect <<-\EOF &&
+ data/file
+ data/data1/file1
+ data/data2/file2
+ EOF
+ test_cmp expect actual
+'
+
############################################################################
#
# test whitespace handling