quoted
@@ -1614,7 +1614,8 @@ static int do_oid_object_info_extended(struct repository *r,
break;
}
- if (register_all_submodule_odb_as_alternates())
+ if (r == the_repository &&
+ register_all_submodule_odb_as_alternates())
/* We added some alternates; retry */
continue;
--
2.33.0.685.g46640cef36-goog
It looks like this is just a small bugfix, but can you expand on the
implications here? What happens if r != the_repository?
The purpose of the quoted block (before and after the check added in
this patch) is so that reading submodule objects by reading them as if
they were in the_repository works, and it follows that this is only
necessary if we pass the_repository (because we are reading them as if
they were in the_repository). I'll add a comment explaining this.