Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-26 02:06:56 +0300
committerJunio C Hamano <gitster@pobox.com>2021-10-26 02:06:56 +0300
commit162a13b855ee8d920a31d6d1e928cef0f0a18e18 (patch)
treec1bfa439f65e07a38957a665c31cbe4dcdcb0b1a /object-file.c
parentbfa646c2cbad55cf652344415616eadc9e20f3c4 (diff)
parent71ef66d7403c05a6fe8ec118431332a8919b52a2 (diff)
Merge branch 'jt/no-abuse-alternate-odb-for-submodules'
Follow through the work to use the repo interface to access submodule objects in-process, instead of abusing the alternate object database interface. * jt/no-abuse-alternate-odb-for-submodules: submodule: trace adding submodule ODB as alternate submodule: pass repo to check_has_commit() object-file: only register submodule ODB if needed merge-{ort,recursive}: remove add_submodule_odb() refs: peeling non-the_repository iterators is BUG refs: teach arbitrary repo support to iterators refs: plumb repo into ref stores
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/object-file.c b/object-file.c
index 8b35fd85bf..b3e1718885 100644
--- a/object-file.c
+++ b/object-file.c
@@ -1528,7 +1528,14 @@ static int do_oid_object_info_extended(struct repository *r,
break;
}
- if (register_all_submodule_odb_as_alternates())
+ /*
+ * If r is the_repository, this might be an attempt at
+ * accessing a submodule object as if it were in the_repository
+ * (having called add_submodule_odb() on that submodule's ODB).
+ * If any such ODBs exist, register them and try again.
+ */
+ if (r == the_repository &&
+ register_all_submodule_odb_as_alternates())
/* We added some alternates; retry */
continue;