aboutsummaryrefslogtreecommitdiffstats
path: root/repo-settings.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-16 12:07:47 -0800
committerJunio C Hamano <gitster@pobox.com>2023-01-16 12:07:47 -0800
commitffd923868574a004ec20a80dbc3b813da9a93b08 (patch)
treefb80c1309a6cd0528d7dcc77d20a18451ef278fc /repo-settings.c
parentMerge branch 'ws/single-file-cone' (diff)
parentfeatures: feature.manyFiles implies fast index writes (diff)
downloadgit-ffd923868574a004ec20a80dbc3b813da9a93b08.tar.gz
git-ffd923868574a004ec20a80dbc3b813da9a93b08.zip
Merge branch 'ds/omit-trailing-hash-in-index'
Introduce an optional configuration to allow the trailing hash that protects the index file from bit flipping. * ds/omit-trailing-hash-in-index: features: feature.manyFiles implies fast index writes test-lib-functions: add helper for trailing hash read-cache: add index.skipHash config option hashfile: allow skipping the hash function
Diffstat (limited to 'repo-settings.c')
-rw-r--r--repo-settings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/repo-settings.c b/repo-settings.c
index 3021921c53..3dbd3f0e2e 100644
--- a/repo-settings.c
+++ b/repo-settings.c
@@ -47,6 +47,7 @@ void prepare_repo_settings(struct repository *r)
}
if (manyfiles) {
r->settings.index_version = 4;
+ r->settings.index_skip_hash = 1;
r->settings.core_untracked_cache = UNTRACKED_CACHE_WRITE;
}
@@ -61,6 +62,7 @@ void prepare_repo_settings(struct repository *r)
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.skiphash", &r->settings.index_skip_hash, r->settings.index_skip_hash);
/*
* The GIT_TEST_MULTI_PACK_INDEX variable is special in that