diff options
author | 2021-12-10 14:35:01 -0800 | |
---|---|---|
committer | 2021-12-10 14:35:01 -0800 | |
commit | 5396d7b298e9db83e98fb6a552a42a6a59984305 (patch) | |
tree | 268a3d472bd5be4ec42da86a026a19a45e856b4f /t/helper | |
parent | Merge branch 'cw/protocol-v2-doc-fix' (diff) | |
parent | sparse-index: update do_read_index to ensure correct sparsity (diff) | |
download | tgif-5396d7b298e9db83e98fb6a552a42a6a59984305.tar.xz |
Merge branch 'vd/sparse-sparsity-fix-on-read'
Ensure that the sparseness of the in-core index matches the
index.sparse configuration specified by the repository immediately
after the on-disk index file is read.
* vd/sparse-sparsity-fix-on-read:
sparse-index: update do_read_index to ensure correct sparsity
sparse-index: add ensure_correct_sparsity function
sparse-index: avoid unnecessary cache tree clearing
test-read-cache.c: prepare_repo_settings after config init
Diffstat (limited to 't/helper')
-rw-r--r-- | t/helper/test-read-cache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/t/helper/test-read-cache.c b/t/helper/test-read-cache.c index b52c174acc..0d9f08931a 100644 --- a/t/helper/test-read-cache.c +++ b/t/helper/test-read-cache.c @@ -39,8 +39,6 @@ int cmd__read_cache(int argc, const char **argv) int table = 0, expand = 0; initialize_the_repository(); - prepare_repo_settings(r); - r->settings.command_requires_full_index = 0; for (++argv, --argc; *argv && starts_with(*argv, "--"); ++argv, --argc) { if (skip_prefix(*argv, "--print-and-refresh=", &name)) @@ -56,6 +54,9 @@ int cmd__read_cache(int argc, const char **argv) setup_git_directory(); git_config(git_default_config, NULL); + prepare_repo_settings(r); + r->settings.command_requires_full_index = 0; + for (i = 0; i < cnt; i++) { repo_read_index(r); |