]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1091-sparse-checkout-builtin.sh
t1091/t3705: remove 'test-tool read-cache --table'
[thirdparty/git.git] / t / t1091-sparse-checkout-builtin.sh
index 272ba1b566b3eaf43798f9ecfb1a77c26db3f59b..680e0043c36a81aa25c682bb174e77cb1fefa790 100755 (executable)
@@ -212,12 +212,27 @@ test_expect_success 'sparse-index enabled and disabled' '
 
                git -C repo sparse-checkout init --cone --sparse-index &&
                test_cmp_config -C repo true index.sparse &&
-               test-tool -C repo read-cache --table >cache &&
-               grep " tree " cache &&
-
+               git -C repo ls-files --sparse >sparse &&
                git -C repo sparse-checkout disable &&
-               test-tool -C repo read-cache --table >cache &&
-               ! grep " tree " cache &&
+               git -C repo ls-files --sparse >full &&
+
+               cat >expect <<-\EOF &&
+               @@ -1,4 +1,7 @@
+                a
+               -deep/
+               -folder1/
+               -folder2/
+               +deep/a
+               +deep/deeper1/a
+               +deep/deeper1/deepest/a
+               +deep/deeper2/a
+               +folder1/a
+               +folder2/a
+               EOF
+
+               diff -u sparse full | tail -n +3 >actual &&
+               test_cmp expect actual &&
+
                git -C repo config --list >config &&
                ! grep index.sparse config
        )