t6006 (rev-list-format): don't hardcode SHA-1 in expected outputs
[gitweb.git] / t / t1011-read-tree-sparse-checkout.sh
index 5c0053a20bf2fbf1dd466ace5dc933e38ce3544d..0c74beedd22600e8dfe852393a5a9a36350cfeb5 100755 (executable)
@@ -250,4 +250,28 @@ EOF
        test_cmp expected actual
 '
 
+test_expect_success 'checkout without --ignore-skip-worktree-bits' '
+       echo "*" >.git/info/sparse-checkout &&
+       git checkout -f top &&
+       test_path_is_file init.t &&
+       echo sub >.git/info/sparse-checkout &&
+       git checkout &&
+       echo modified >> sub/added &&
+       git checkout . &&
+       test_path_is_missing init.t &&
+       git diff --exit-code HEAD
+'
+
+test_expect_success 'checkout with --ignore-skip-worktree-bits' '
+       echo "*" >.git/info/sparse-checkout &&
+       git checkout -f top &&
+       test_path_is_file init.t &&
+       echo sub >.git/info/sparse-checkout &&
+       git checkout &&
+       echo modified >> sub/added &&
+       git checkout --ignore-skip-worktree-bits . &&
+       test_path_is_file init.t &&
+       git diff --exit-code HEAD
+'
+
 test_done