]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t1091-sparse-checkout-builtin.sh
Sync with 2.31.5
[thirdparty/git.git] / t / t1091-sparse-checkout-builtin.sh
index 705efb581170b9761592fec4bbd0b7521bb0923c..ab7b6049983e4aa48b5ca425b35d48df89b17106 100755 (executable)
@@ -205,6 +205,19 @@ test_expect_success 'sparse-checkout disable' '
        check_files repo a deep folder1 folder2
 '
 
+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 sparse-checkout disable &&
+       test-tool -C repo read-cache --table >cache &&
+       ! grep " tree " cache &&
+       git -C repo config --list >config &&
+       ! grep index.sparse config
+'
+
 test_expect_success 'cone mode: init and set' '
        git -C repo sparse-checkout init --cone &&
        git -C repo config --list >config &&