зеркало из https://github.com/microsoft/git.git
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 <dstolee@microsoft.com>
This commit is contained in:
Родитель
5136c09406
Коммит
3d9b8977e3
|
@ -86,7 +86,7 @@ void prepare_repo_settings(struct repository *r)
|
||||||
/* Boolean config or default, does not cascade (simple) */
|
/* Boolean config or default, does not cascade (simple) */
|
||||||
repo_cfg_bool(r, "pack.usesparse", &r->settings.pack_use_sparse, 1);
|
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, "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, "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.readreverseindex", &r->settings.pack_read_reverse_index, 1);
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ test_expect_success 'setup repo and indexes' '
|
||||||
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v3 &&
|
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v3 &&
|
||||||
(
|
(
|
||||||
cd 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 sparse-checkout set $SPARSE_CONE &&
|
||||||
git config index.version 3 &&
|
git config index.version 3 &&
|
||||||
git update-index --index-version=3 &&
|
git update-index --index-version=3 &&
|
||||||
|
@ -65,7 +65,7 @@ test_expect_success 'setup repo and indexes' '
|
||||||
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v4 &&
|
git -c core.sparseCheckoutCone=true clone --branch=wide --sparse . full-v4 &&
|
||||||
(
|
(
|
||||||
cd 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 sparse-checkout set $SPARSE_CONE &&
|
||||||
git config index.version 4 &&
|
git config index.version 4 &&
|
||||||
git update-index --index-version=4 &&
|
git update-index --index-version=4 &&
|
||||||
|
|
|
@ -155,6 +155,7 @@ init_repos () {
|
||||||
git -C sparse-index reset --hard &&
|
git -C sparse-index reset --hard &&
|
||||||
|
|
||||||
# initialize sparse-checkout definitions
|
# 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 init --cone &&
|
||||||
git -C sparse-checkout sparse-checkout set deep &&
|
git -C sparse-checkout sparse-checkout set deep &&
|
||||||
git -C sparse-index sparse-checkout init --cone --sparse-index &&
|
git -C sparse-index sparse-checkout init --cone --sparse-index &&
|
||||||
|
|
|
@ -49,7 +49,7 @@ test_expect_success 'setup' '
|
||||||
echo "text" >B/b &&
|
echo "text" >B/b &&
|
||||||
git add A B &&
|
git add A B &&
|
||||||
git commit -m sub &&
|
git commit -m sub &&
|
||||||
git sparse-checkout init --cone &&
|
git sparse-checkout init --cone --no-sparse-index &&
|
||||||
git sparse-checkout set B
|
git sparse-checkout set B
|
||||||
) &&
|
) &&
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче