MCPcopy Create free account
hub / github.com/git/git / register_all_submodule_sources

Function register_all_submodule_sources

odb.c:533–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531int fetch_if_missing = 1;
532
533static int register_all_submodule_sources(struct object_database *odb)
534{
535 int ret = odb->submodule_source_paths.nr;
536
537 for (size_t i = 0; i < odb->submodule_source_paths.nr; i++)
538 odb_add_to_alternates_memory(odb,
539 odb->submodule_source_paths.items[i].string);
540 if (ret) {
541 string_list_clear(&odb->submodule_source_paths, 0);
542 trace2_data_intmax("submodule", odb->repo,
543 "register_all_submodule_sources/registered", ret);
544 if (git_env_bool("GIT_TEST_FATAL_REGISTER_SUBMODULE_ODB", 0))
545 BUG("register_all_submodule_sources() called");
546 }
547 return ret;
548}
549
550static int do_oid_object_info_extended(struct object_database *odb,
551 const struct object_id *oid,

Callers 1

Calls 3

string_list_clearFunction · 0.85
git_env_boolFunction · 0.85

Tested by

no test coverage detected