aboutsummaryrefslogtreecommitdiffstats
path: root/object-file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-09-20 15:20:39 -0700
committerJunio C Hamano <gitster@pobox.com>2021-09-20 15:20:39 -0700
commit11e5d0a262c9ba664b7203a279513385bf055745 (patch)
treeca86652bab65fc3ed1943acc482057e3be862188 /object-file.c
parent0649303820cf88fb5a6ab440af15c8d6b8799d3f (diff)
parent18a2f66d8a5514fec214613a75e6a238532d2664 (diff)
downloadgit-11e5d0a262c9ba664b7203a279513385bf055745.tar.gz
Merge branch 'jt/grep-wo-submodule-odb-as-alternate'
The code to make "git grep" recurse into submodules has been updated to migrate away from the "add submodule's object store as an alternate object store" mechanism (which is suboptimal). * jt/grep-wo-submodule-odb-as-alternate: t7814: show lack of alternate ODB-adding submodule-config: pass repo upon blob config read grep: add repository to OID grep sources grep: allocate subrepos on heap grep: read submodule entry with explicit repo grep: typesafe versions of grep_source_init grep: use submodule-ODB-as-alternate lazy-addition submodule: lazily add submodule ODBs as alternates
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/object-file.c b/object-file.c
index a4d720b4f5..c1f7ece055 100644
--- a/object-file.c
+++ b/object-file.c
@@ -32,6 +32,7 @@
#include "packfile.h"
#include "object-store.h"
#include "promisor-remote.h"
+#include "submodule.h"
/* The maximum size for an object header. */
#define MAX_HEADER_LEN 32
@@ -1613,6 +1614,10 @@ static int do_oid_object_info_extended(struct repository *r,
break;
}
+ if (register_all_submodule_odb_as_alternates())
+ /* We added some alternates; retry */
+ continue;
+
/* Check if it is a missing object */
if (fetch_if_missing && repo_has_promisor_remote(r) &&
!already_retried &&