Skip to content

Commit dab75a5

Browse files
derrickstoleedscho
authored andcommitted
Merge pull request #414: Make sparse index the default
This branch is exactly #410, but with one more commit: enabling the sparse index by default in d59110a. Having this in the `vfs-2.33.0` branch helps build confidence that the sparse index is doing what it should be doing by running in the Scalar functional tests and in our test branches. If we want to cut a new `microsoft/git` release without enabling the sparse index, we can simply revert this commit.
2 parents 1ab6439 + 3b6edb8 commit dab75a5

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

repo-settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void prepare_repo_settings(struct repository *r)
8484
/* Boolean config or default, does not cascade (simple) */
8585
repo_cfg_bool(r, "pack.usesparse", &r->settings.pack_use_sparse, 1);
8686
repo_cfg_bool(r, "core.multipackindex", &r->settings.core_multi_pack_index, 1);
87-
repo_cfg_bool(r, "index.sparse", &r->settings.sparse_index, 0);
87+
repo_cfg_bool(r, "index.sparse", &r->settings.sparse_index, 1);
8888

8989
/*
9090
* The GIT_TEST_MULTI_PACK_INDEX variable is special in that

t/perf/p2000-sparse-operations.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test_expect_success 'setup repo and indexes' '
5555
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v3 &&
5656
(
5757
cd full-v3 &&
58-
git sparse-checkout init --cone &&
58+
git sparse-checkout init --cone --no-sparse-index &&
5959
git sparse-checkout set $SPARSE_CONE &&
6060
git config index.version 3 &&
6161
git update-index --index-version=3 &&
@@ -64,7 +64,7 @@ test_expect_success 'setup repo and indexes' '
6464
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v4 &&
6565
(
6666
cd full-v4 &&
67-
git sparse-checkout init --cone &&
67+
git sparse-checkout init --cone --no-sparse-index &&
6868
git sparse-checkout set $SPARSE_CONE &&
6969
git config index.version 4 &&
7070
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)