From: Junio C Hamano Date: Mon, 7 Mar 2022 05:25:30 +0000 (-0800) Subject: Merge branch 'en/sparse-checkout-fixes' X-Git-Tag: v2.36.0-rc0~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=967176465a62fe3f71008e20c5959c12542ef2b0;p=thirdparty%2Fgit.git Merge branch 'en/sparse-checkout-fixes' Further polishing of "git sparse-checkout". * en/sparse-checkout-fixes: sparse-checkout: reject arguments in cone-mode that look like patterns sparse-checkout: error or warn when given individual files sparse-checkout: pay attention to prefix for {set, add} sparse-checkout: correctly set non-cone mode when expected sparse-checkout: correct reapply's handling of options --- 967176465a62fe3f71008e20c5959c12542ef2b0 diff --cc t/t1091-sparse-checkout-builtin.sh index 502d42d183,421127d99c..9a90031018 --- a/t/t1091-sparse-checkout-builtin.sh +++ b/t/t1091-sparse-checkout-builtin.sh @@@ -510,6 -495,34 +510,37 @@@ test_expect_failure 'sparse-checkout re git -C tweak sparse-checkout disable ' + test_expect_success 'reapply can handle config options' ' + git -C repo sparse-checkout init --cone --no-sparse-index && + git -C repo config --worktree --list >actual && + cat >expect <<-\EOF && + core.sparsecheckout=true + core.sparsecheckoutcone=true ++ index.sparse=false + EOF + test_cmp expect actual && + + git -C repo sparse-checkout reapply --no-cone --no-sparse-index && + git -C repo config --worktree --list >actual && + cat >expect <<-\EOF && + core.sparsecheckout=true ++ core.sparsecheckoutcone=false ++ index.sparse=false + EOF + test_cmp expect actual && + + git -C repo sparse-checkout reapply --cone --sparse-index && + git -C repo config --worktree --list >actual && + cat >expect <<-\EOF && + core.sparsecheckout=true + core.sparsecheckoutcone=true + index.sparse=true + EOF + test_cmp expect actual && + + git -C repo sparse-checkout disable + ' + test_expect_success 'cone mode: set with core.ignoreCase=true' ' rm repo/.git/info/sparse-checkout && git -C repo sparse-checkout init --cone &&