aboutsummaryrefslogtreecommitdiff
path: root/t/t1011-read-tree-sparse-checkout.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-22 14:40:26 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-22 14:40:26 -0800
commite39212ab08e8d37dda5d8fd32b54099fe01dbbdb (patch)
treeacfce393969ebf4d2404a4619c84553e761803e7 /t/t1011-read-tree-sparse-checkout.sh
parent716958c9a23cbb4bf671dc89e094742e8ec41793 (diff)
parent9e082734b3a7c2685c1593dae8dca1e73568d51c (diff)
downloadgit-e39212ab08e8d37dda5d8fd32b54099fe01dbbdb.tar.gz
git-e39212ab08e8d37dda5d8fd32b54099fe01dbbdb.tar.xz
Merge branch 'nd/maint-fix-add-typo-detection'
* nd/maint-fix-add-typo-detection: Revert "excluded_1(): support exclude files in index" unpack-trees: fix sparse checkout's "unable to match directories" unpack-trees: move all skip-worktree checks back to unpack_trees() dir.c: add free_excludes() cache.h: realign and use (1 << x) form for CE_* constants
Diffstat (limited to 't/t1011-read-tree-sparse-checkout.sh')
-rwxr-xr-xt/t1011-read-tree-sparse-checkout.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/t/t1011-read-tree-sparse-checkout.sh b/t/t1011-read-tree-sparse-checkout.sh
index 0ef11bccb..de84e35c4 100755
--- a/t/t1011-read-tree-sparse-checkout.sh
+++ b/t/t1011-read-tree-sparse-checkout.sh
@@ -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
'