Skip to content

Commit

Permalink
Merge pull request #414: Make sparse index the default
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
derrickstolee authored and dscho committed Aug 8, 2023
2 parents f297d6c + 18e4364 commit e2e5c92
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion repo-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void prepare_repo_settings(struct repository *r)
/* Boolean config or default, does not cascade (simple) */
repo_cfg_bool(r, "pack.usesparse", &r->settings.pack_use_sparse, 1);
repo_cfg_bool(r, "core.multipackindex", &r->settings.core_multi_pack_index, 1);
repo_cfg_bool(r, "index.sparse", &r->settings.sparse_index, 0);
repo_cfg_bool(r, "index.sparse", &r->settings.sparse_index, 1);
repo_cfg_bool(r, "index.skiphash", &r->settings.index_skip_hash, r->settings.index_skip_hash);
repo_cfg_bool(r, "pack.readreverseindex", &r->settings.pack_read_reverse_index, 1);
repo_cfg_bool(r, "pack.usebitmapboundarytraversal",
Expand Down
4 changes: 2 additions & 2 deletions t/perf/p2000-sparse-operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test_expect_success 'setup repo and indexes' '
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v3 &&
(
cd full-v3 &&
git sparse-checkout init --cone &&
git sparse-checkout init --cone --no-sparse-index &&
git sparse-checkout set $SPARSE_CONE &&
git config index.version 3 &&
git update-index --index-version=3 &&
Expand All @@ -65,7 +65,7 @@ test_expect_success 'setup repo and indexes' '
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v4 &&
(
cd full-v4 &&
git sparse-checkout init --cone &&
git sparse-checkout init --cone --no-sparse-index &&
git sparse-checkout set $SPARSE_CONE &&
git config index.version 4 &&
git update-index --index-version=4 &&
Expand Down
1 change: 1 addition & 0 deletions t/t1092-sparse-checkout-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ init_repos () {
git -C sparse-index reset --hard &&

# initialize sparse-checkout definitions
git -C sparse-checkout config index.sparse false &&
git -C sparse-checkout sparse-checkout init --cone &&
git -C sparse-checkout sparse-checkout set deep &&
git -C sparse-index sparse-checkout init --cone --sparse-index &&
Expand Down
2 changes: 1 addition & 1 deletion t/t7817-grep-sparse-checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ test_expect_success 'setup' '
echo "text" >B/b &&
git add A B &&
git commit -m sub &&
git sparse-checkout init --cone &&
git sparse-checkout init --cone --no-sparse-index &&
git sparse-checkout set B
) &&
Expand Down

0 comments on commit e2e5c92

Please sign in to comment.