diff options
author | Victoria Dye <vdye@github.com> | 2021-11-23 00:20:30 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-24 16:32:38 -0800 |
commit | 336d82e47235fdfb093fefbd6b6595deaab6ca2b (patch) | |
tree | 51b7d9ada1ca4b5e47fb4c27689dec3cd594ecb3 /t/helper | |
parent | Thirteenth batch (diff) | |
download | tgif-336d82e47235fdfb093fefbd6b6595deaab6ca2b.tar.xz |
test-read-cache.c: prepare_repo_settings after config init
Move `prepare_repo_settings` after the git directory has been set up in
`test-read-cache.c`. The git directory settings must be initialized to
properly assign repo settings using the worktree-level git config.
Signed-off-by: Victoria Dye <vdye@github.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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); |