Skip to content

Commit a17261c

Browse files
derrickstoleemjcheetham
authored andcommitted
repo-settings: enable sparse index by default
There is some strangeness when expanding a sparse-index that exists within a submodule. We will need to resolve that later, but for now, let's do a better job of explicitly disabling the sparse-index when requested, and do so in t7817. Signed-off-by: Derrick Stolee <[email protected]>
1 parent c92731b commit a17261c

4 files changed

+5
-4
lines changed

repo-settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void prepare_repo_settings(struct repository *r)
9292
/* Boolean config or default, does not cascade (simple) */
9393
repo_cfg_bool(r, "pack.usesparse", &r->settings.pack_use_sparse, 1);
9494
repo_cfg_bool(r, "core.multipackindex", &r->settings.core_multi_pack_index, 1);
95-
repo_cfg_bool(r, "index.sparse", &r->settings.sparse_index, 0);
95+
repo_cfg_bool(r, "index.sparse", &r->settings.sparse_index, 1);
9696
repo_cfg_bool(r, "index.skiphash", &r->settings.index_skip_hash, r->settings.index_skip_hash);
9797
repo_cfg_bool(r, "pack.readreverseindex", &r->settings.pack_read_reverse_index, 1);
9898
repo_cfg_bool(r, "pack.usebitmapboundarytraversal",

t/perf/p2000-sparse-operations.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ test_expect_success 'setup repo and indexes' '
5656
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v3 &&
5757
(
5858
cd full-v3 &&
59-
git sparse-checkout init --cone &&
59+
git sparse-checkout init --cone --no-sparse-index &&
6060
git sparse-checkout set $SPARSE_CONE &&
6161
git config index.version 3 &&
6262
git update-index --index-version=3 &&
@@ -65,7 +65,7 @@ test_expect_success 'setup repo and indexes' '
6565
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v4 &&
6666
(
6767
cd full-v4 &&
68-
git sparse-checkout init --cone &&
68+
git sparse-checkout init --cone --no-sparse-index &&
6969
git sparse-checkout set $SPARSE_CONE &&
7070
git config index.version 4 &&
7171
git update-index --index-version=4 &&

t/t1092-sparse-checkout-compatibility.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ init_repos () {
155155
git -C sparse-index reset --hard &&
156156

157157
# initialize sparse-checkout definitions
158+
git -C sparse-checkout config index.sparse false &&
158159
git -C sparse-checkout sparse-checkout init --cone &&
159160
git -C sparse-checkout sparse-checkout set deep &&
160161
git -C sparse-index sparse-checkout init --cone --sparse-index &&

t/t7817-grep-sparse-checkout.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ test_expect_success 'setup' '
4949
echo "text" >B/b &&
5050
git add A B &&
5151
git commit -m sub &&
52-
git sparse-checkout init --cone &&
52+
git sparse-checkout init --cone --no-sparse-index &&
5353
git sparse-checkout set B
5454
) &&
5555

0 commit comments

Comments
 (0)