submodule: don't add submodule as odb for push

In push_submodule(), because we do not actually need access to objects in the submodule, do not invoke add_submodule_odb(). (for_each_remote_ref_submodule() does not require access to those objects, and the actual push is done by spawning another process, which handles object access by itself.) This code of push_submodule() is exercised in t5531 and continues to work, showing that the submodule odbc is not needed. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Dec 14, 2018 at 16:09 UTC 142e9f4432199cec5de418d74b37872d8330f696
1 file changed -3
submodule.c
-3
@@ -1023,9 +1023,6 @@ static int push_submodule(const char *path,
1023 const struct string_list *push_options,
1024 int dry_run)
1025 {
1026 - if (add_submodule_odb(path))
1027 - return 1;
1028 -
1026 if (for_each_remote_ref_submodule(path, has_remote, NULL) > 0) {
1027 struct child_process cp = CHILD_PROCESS_INIT;
1028 argv_array_push(&cp.args, "push");