summaryrefslogtreecommitdiff
path: root/t/t1091-sparse-checkout-builtin.sh
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-11-21 22:04:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-11-22 07:11:45 (GMT)
commit99dfa6f9702ee81c44ef9382933e4e391ec5d6ee (patch)
treeebd9b7b6ab450e71366c5415b9b10ad3aea906aa /t/t1091-sparse-checkout-builtin.sh
parente091228e17e88b1bc16cb50d5c3aff10dc5119d1 (diff)
downloadgit-99dfa6f9702ee81c44ef9382933e4e391ec5d6ee.zip
git-99dfa6f9702ee81c44ef9382933e4e391ec5d6ee.tar.gz
git-99dfa6f9702ee81c44ef9382933e4e391ec5d6ee.tar.bz2
sparse-checkout: use in-process update for disable subcommand
The 'git sparse-checkout disable' subcommand returns a user to a full working directory. The old process for doing this required updating the sparse-checkout file with the "/*" pattern and then updating the working directory with core.sparseCheckout enabled. Finally, the sparse-checkout file could be removed and the config setting disabled. However, it is valuable to keep a user's sparse-checkout file intact so they can re-enable the sparse-checkout they previously used with 'git sparse-checkout init'. This is now possible with the in-process mechanism for updating the working directory. Reported-by: Szeder Gábor <szeder.dev@gmail.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1091-sparse-checkout-builtin.sh')
-rwxr-xr-xt/t1091-sparse-checkout-builtin.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
index 53aeb59..b8f18e2 100755
--- a/t/t1091-sparse-checkout-builtin.sh
+++ b/t/t1091-sparse-checkout-builtin.sh
@@ -172,8 +172,9 @@ test_expect_success 'cone mode: warn on bad pattern' '
'
test_expect_success 'sparse-checkout disable' '
+ test_when_finished rm -rf repo/.git/info/sparse-checkout &&
git -C repo sparse-checkout disable &&
- test_path_is_missing repo/.git/info/sparse-checkout &&
+ test_path_is_file repo/.git/info/sparse-checkout &&
git -C repo config --list >config &&
test_must_fail git config core.sparseCheckout &&
ls repo >dir &&