summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t1091-sparse-checkout-builtin.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
index c35cbdef45..b4c9c32a03 100755
--- a/t/t1091-sparse-checkout-builtin.sh
+++ b/t/t1091-sparse-checkout-builtin.sh
@@ -417,10 +417,20 @@ test_expect_success 'pattern-checks: too short' '
cat >repo/.git/info/sparse-checkout <<-\EOF &&
/*
!/*/
- /a
+ /
EOF
check_read_tree_errors repo "a" "disabling cone pattern matching"
'
+test_expect_success 'pattern-checks: not too short' '
+ cat >repo/.git/info/sparse-checkout <<-\EOF &&
+ /*
+ !/*/
+ /b/
+ EOF
+ git -C repo read-tree -mu HEAD 2>err &&
+ test_must_be_empty err &&
+ check_files repo a
+'
test_expect_success 'pattern-checks: trailing "*"' '
cat >repo/.git/info/sparse-checkout <<-\EOF &&