Code

Merge branch 'jk/git-connection-deadlock-fix'
[git.git] / t / t1011-read-tree-sparse-checkout.sh
index 8008fa2d894baf76a19168a020ed4f4640619ce7..de84e35c4357c7329b3fae749228df28f31a9d3f 100755 (executable)
@@ -49,7 +49,7 @@ test_expect_success 'read-tree without .git/info/sparse-checkout' '
 '
 
 test_expect_success 'read-tree with .git/info/sparse-checkout but disabled' '
-       echo >.git/info/sparse-checkout
+       echo >.git/info/sparse-checkout &&
        git read-tree -m -u HEAD &&
        git ls-files -t >result &&
        test_cmp expected.swt result &&
@@ -94,12 +94,20 @@ test_expect_success 'match directories with trailing slash' '
        test -f sub/added
 '
 
-test_expect_failure 'match directories without trailing slash' '
-       echo init.t >.git/info/sparse-checkout &&
+test_expect_success 'match directories without trailing slash' '
        echo sub >>.git/info/sparse-checkout &&
        git read-tree -m -u HEAD &&
        git ls-files -t >result &&
-       test_cmp expected.swt result &&
+       test_cmp expected.swt-noinit result &&
+       test ! -f init.t &&
+       test -f sub/added
+'
+
+test_expect_success 'match directory pattern' '
+       echo "s?b" >>.git/info/sparse-checkout &&
+       git read-tree -m -u HEAD &&
+       git ls-files -t >result &&
+       test_cmp expected.swt-noinit result &&
        test ! -f init.t &&
        test -f sub/added
 '