diff options
Diffstat (limited to 'builtin/grep.c')
| -rw-r--r-- | builtin/grep.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 53cccf2d25..e33285e5e6 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -482,7 +482,7 @@ static int grep_submodule(struct grep_opt *opt, * "forget" the sparse-index feature switch. As a result, the index * of these submodules are expanded unexpectedly. * - * 2. "core_apply_sparse_checkout" + * 2. "config_values_private_.apply_sparse_checkout" * When running `grep` in the superproject, this setting is * populated using the superproject's configs. However, once * initialized, this config is globally accessible and is read by @@ -1213,8 +1213,16 @@ int cmd_grep(int argc, */ if (recurse_submodules) repo_read_gitmodules(the_repository, 1); - if (startup_info->have_repository) - packfile_store_prepare(the_repository->objects->packfiles); + + if (startup_info->have_repository) { + struct odb_source *source; + + odb_prepare_alternates(the_repository->objects); + for (source = the_repository->objects->sources; source; source = source->next) { + struct odb_source_files *files = odb_source_files_downcast(source); + packfile_store_prepare(files->packed); + } + } start_threads(&opt); } else { |
